aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/io_SUITE.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-07-21 15:36:45 +0200
committerRaimo Niskanen <[email protected]>2011-07-21 15:36:45 +0200
commitf5b1153ea4eb536c44999debc7a9d7707a1e070b (patch)
tree64a5f56fba8b3ea1236857d736484174fd9ed915 /lib/stdlib/test/io_SUITE.erl
parentfd09fd9f41824fb56fd4d31c2fa18b3f4168e4e9 (diff)
downloadotp-f5b1153ea4eb536c44999debc7a9d7707a1e070b.tar.gz
otp-f5b1153ea4eb536c44999debc7a9d7707a1e070b.tar.bz2
otp-f5b1153ea4eb536c44999debc7a9d7707a1e070b.zip
EOF before first field is only ok for first character in io:fread
Diffstat (limited to 'lib/stdlib/test/io_SUITE.erl')
-rw-r--r--lib/stdlib/test/io_SUITE.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl
index 03dc655426..bb02a879c2 100644
--- a/lib/stdlib/test/io_SUITE.erl
+++ b/lib/stdlib/test/io_SUITE.erl
@@ -2011,7 +2011,13 @@ io_lib_fread_literal(Suite) when is_list(Suite) ->
%%
?line {done,eof,_} = io_lib:fread([], eof, "~d"),
?line {done,eof,_} = io_lib:fread([], eof, " ~d"),
+ ?line {more,C1} = io_lib:fread([], " \n", " ~d"),
+ ?line {done,{error,{fread,input}},_} = io_lib:fread(C1, eof, " ~d"),
+ ?line {done,{ok,[18]},""} = io_lib:fread(C1, "18\n", " ~d"),
%%
?line {done,eof,_} = io_lib:fread([], eof, "d"),
?line {done,eof,_} = io_lib:fread([], eof, " d"),
+ ?line {more,C2} = io_lib:fread([], " \n", " d"),
+ ?line {done,{error,{fread,input}},_} = io_lib:fread(C2, eof, " d"),
+ ?line {done,{ok,[]},[]} = io_lib:fread(C2, "d\n", " d"),
ok.