diff options
author | Hans Bolinder <[email protected]> | 2018-08-21 14:14:54 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-08-21 14:14:54 +0200 |
commit | bcba1f261306beddf3463a471399e6a2fa90c99f (patch) | |
tree | 0f6c6aa561b6fd8c3e804ff9e6435c975b1081b5 /lib/stdlib/test | |
parent | cc40705b86d1ca25286f8c0f522c8c7bbbeca6cd (diff) | |
parent | 00401985f1c9227b6e94309ae5526c2ebf341527 (diff) | |
download | otp-bcba1f261306beddf3463a471399e6a2fa90c99f.tar.gz otp-bcba1f261306beddf3463a471399e6a2fa90c99f.tar.bz2 otp-bcba1f261306beddf3463a471399e6a2fa90c99f.zip |
Merge branch 'maint'
* maint:
stdlib: Correct contracts in module io_lib_format
stdlib: Improve error handling in module io_lib
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/io_SUITE.erl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl index 79cee54335..f097552e8c 100644 --- a/lib/stdlib/test/io_SUITE.erl +++ b/lib/stdlib/test/io_SUITE.erl @@ -31,7 +31,7 @@ otp_10836/1, io_lib_width_too_small/1, io_with_huge_message_queue/1, format_string/1, maps/1, coverage/1, otp_14178_unicode_atoms/1, otp_14175/1, - otp_14285/1, limit_term/1, otp_14983/1, otp_15103/1, + otp_14285/1, limit_term/1, otp_14983/1, otp_15103/1, otp_15076/1, otp_15159/1]). -export([pretty/2, trf/3]). @@ -64,7 +64,7 @@ all() -> io_lib_print_binary_depth_one, otp_10302, otp_10755, otp_10836, io_lib_width_too_small, io_with_huge_message_queue, format_string, maps, coverage, otp_14178_unicode_atoms, otp_14175, - otp_14285, limit_term, otp_14983, otp_15103, otp_15159]. + otp_14285, limit_term, otp_14983, otp_15103, otp_15076, otp_15159]. %% Error cases for output. error_1(Config) when is_list(Config) -> @@ -2639,3 +2639,11 @@ otp_15159(_Config) -> "[atom]" = lists:flatten(io_lib:format("~p", [[atom]], [{chars_limit,5}])), ok. + +otp_15076(_Config) -> + {'EXIT', {badarg, _}} = (catch io_lib:format("~c", [a])), + L = io_lib:scan_format("~c", [a]), + {"~c", [a]} = io_lib:unscan_format(L), + {'EXIT', {badarg, _}} = (catch io_lib:build_text(L)), + {'EXIT', {badarg, _}} = (catch io_lib:build_text(L, [])), + ok. |