small refactor and cleanup
This commit is contained in:
17
tests/io_write_file.sl
Normal file
17
tests/io_write_file.sl
Normal file
@@ -0,0 +1,17 @@
|
||||
import ../stdlib/stdlib.sl
|
||||
import ../stdlib/io.sl
|
||||
|
||||
: main
|
||||
"/tmp/l2_write_file_test.txt" # path
|
||||
"hello from write_file test\n" # buffer
|
||||
write_file
|
||||
dup 0 > if
|
||||
"wrote bytes: " puts
|
||||
puti cr
|
||||
0
|
||||
exit
|
||||
end
|
||||
"write failed errno=" puts
|
||||
puti cr
|
||||
exit
|
||||
;
|
||||
Reference in New Issue
Block a user