[ADD] input and output tests

This commit is contained in:
Eduardo Cueto Mendoza 2020-05-09 16:20:57 -06:00
parent 5306105102
commit 7344cc6830
2 changed files with 12 additions and 1 deletions

View File

@ -4,6 +4,8 @@ println(s)
stream = open("elements.txt","r")
println(supertype(IOStream))
line = readline(stream)
println(line)
@ -21,6 +23,14 @@ println(read(stream, Int8))
println(readstring(stream))
println(eof(stream))
close(stream)
open(readlines,"elements.txt")
#@edit readstring("elements.txt")
myread(s::IOStream) = read(s,Char)
println(open(myread,"elements.txt"))
@ -46,4 +56,5 @@ open("alpha.txt", "w") do io
for ch in 'A':'Z'
write(io, ch)
end
write(io,"\n")
end