Fix I/O-protocol handling in eunit

Yuki Ito <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches
Message-ID <CAFN=DcvgmpEyFQnCNoGgAJTn5xmWdbVVspL_xDsZnA4yNVm7EQ@mail.gmail.com>
Hi,

Some io_requests, getopts, {get_geometry, rows} and {get_geometry, columns}
in eunit raises unexpected error.

For example,

$ cat my_tests.erl
-module(my_tests).
-include_lib("eunit/include/eunit.hrl").

my_test() ->
  io:getopts().

1> c(my_tests).
{ok,my_tests}
2> eunit:test(my_tests).
my_tests: my_test (module 'my_tests')...*skipped*
undefined
*unexpected termination of test process*
::{{badmatch,{error,{error,enotsup},[]}},
   [{eunit_proc,io_request,4,[{file,"eunit_proc.erl"},{line,614}]},

 {eunit_proc,group_leader_loop,3,[{file,"eunit_proc.erl"},{line,584}]}]}

       =======================================================
         Failed: 0.  Skipped: 0.  Passed: 0.
         One or more tests were cancelled.
         error
         3>
         =ERROR REPORT==== 11-May-2013::05:51:35 ===
         Error in process <0.49.0> with exit value:
{{badmatch,{error,{error,enotsup},[]}},[{eunit_proc,io_request,4,[{file,"eunit_proc.erl"},{line,614}]},{eunit_proc,group_leader_loop,3,[{file,"eunit_proc.erl"},{line,584}]}]}


git fetch [email protected]:mururu/otp.git fix_eunit_io_protocol
https://github.com/mururu/otp/compare/erlang:maint...fix_eunit_io_protocol
https://github.com/mururu/otp/compare/erlang:maint...fix_eunit_io_protocol.patch

Thanks.

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.