aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-10-09 13:05:55 +0200
committerFredrik Gustafsson <[email protected]>2013-10-09 13:05:55 +0200
commit2e8c51a58225dff0ac88562a22413c23c2a845c0 (patch)
tree86741ff13ad10f395c701d41fd97591e14b68e98 /lib
parentf584c3d4e211c4d2619618977cd45ca3db1d69df (diff)
parentc666e8c99ad0974cd6fce047b8b1f9c9aacd4c19 (diff)
downloadotp-2e8c51a58225dff0ac88562a22413c23c2a845c0.tar.gz
otp-2e8c51a58225dff0ac88562a22413c23c2a845c0.tar.bz2
otp-2e8c51a58225dff0ac88562a22413c23c2a845c0.zip
Merge branch 'mururu/fix-eunit-io_request/OTP-11373' into maint
* mururu/fix-eunit-io_request/OTP-11373: Fix I/O-protocol error handling in eunit
Diffstat (limited to 'lib')
-rw-r--r--lib/eunit/src/eunit_proc.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/eunit/src/eunit_proc.erl b/lib/eunit/src/eunit_proc.erl
index ec7d93fd48..03d1a18321 100644
--- a/lib/eunit/src/eunit_proc.erl
+++ b/lib/eunit/src/eunit_proc.erl
@@ -643,11 +643,11 @@ io_request({get_until, _Prompt, _M, _F, _As}, Buf) ->
io_request({setopts, _Opts}, Buf) ->
{ok, Buf};
io_request(getopts, Buf) ->
- {error, {error, enotsup}, Buf};
+ {{error, enotsup}, Buf};
io_request({get_geometry,columns}, Buf) ->
- {error, {error, enotsup}, Buf};
+ {{error, enotsup}, Buf};
io_request({get_geometry,rows}, Buf) ->
- {error, {error, enotsup}, Buf};
+ {{error, enotsup}, Buf};
io_request({requests, Reqs}, Buf) ->
io_requests(Reqs, {ok, Buf});
io_request(_, Buf) ->
@@ -657,3 +657,10 @@ io_requests([R | Rs], {ok, Buf}) ->
io_requests(Rs, io_request(R, Buf));
io_requests(_, Result) ->
Result.
+
+-ifdef(TEST).
+io_error_test_() ->
+ [?_assertMatch({error, enotsup}, io:getopts()),
+ ?_assertMatch({error, enotsup}, io:columns()),
+ ?_assertMatch({error, enotsup}, io:rows())].
+-endif.