diff options
author | Sverker Eriksson <[email protected]> | 2016-03-08 14:46:09 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-03-08 14:46:09 +0100 |
commit | 7ba125fafa1da21d8780bcdae97f1ef56fb6a39a (patch) | |
tree | 671891684d94d78211f501371187bb2b425bcdaa /lib/stdlib/test/io_SUITE.erl | |
parent | 2dc84032fd2a957b1625aba9bbcea9cbc04aa0df (diff) | |
parent | 652b67ba8d15ff415a8f30034bd9eb03a9c2b8ca (diff) | |
download | otp-7ba125fafa1da21d8780bcdae97f1ef56fb6a39a.tar.gz otp-7ba125fafa1da21d8780bcdae97f1ef56fb6a39a.tar.bz2 otp-7ba125fafa1da21d8780bcdae97f1ef56fb6a39a.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/test/io_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/io_SUITE.erl | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl index 821673559b..1aca0f3fa6 100644 --- a/lib/stdlib/test/io_SUITE.erl +++ b/lib/stdlib/test/io_SUITE.erl @@ -2125,12 +2125,24 @@ rpc_call_max(Node, M, F, Args) -> %% Make sure that a bad specification for a printable range is rejected. bad_printable_range(Config) when is_list(Config) -> Cmd = lists:concat([lib:progname()," +pcunnnnnicode -run erlang halt"]), - case os:cmd(Cmd) of - "bad range of printable characters" ++ _ -> - ok; - String -> - io:format("~s\n", [String]), - ?t:fail() + P = open_port({spawn, Cmd}, [stderr_to_stdout, {line, 200}]), + ok = receive + {P, {data, {eol , "bad range of printable characters" ++ _}}} -> + ok; + Other -> + Other + after 1000 -> + timeout + end, + catch port_close(P), + flush_from_port(P), + ok. + +flush_from_port(P) -> + receive {P, _} -> + flush_from_port(P) + after 0 -> + ok end. io_lib_print_binary_depth_one(doc) -> |