aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-04-09 08:24:32 +0200
committerHans Bolinder <[email protected]>2019-04-09 08:24:32 +0200
commit8487c67c2e5738d05a49f110be21b9ff8943a4c9 (patch)
tree3ffb9e0726d231c8f208bce2965683936483e2d0 /lib/stdlib/test
parent45bb3d43fdba5b085fdd2f944277784ec18e60a8 (diff)
parent0682f0a9b141090caee750bfc34a424a2e0defa2 (diff)
downloadotp-8487c67c2e5738d05a49f110be21b9ff8943a4c9.tar.gz
otp-8487c67c2e5738d05a49f110be21b9ff8943a4c9.tar.bz2
otp-8487c67c2e5738d05a49f110be21b9ff8943a4c9.zip
Merge branch 'hasse/stdlib/erl_pp_throw/OTP-15751'
* hasse/stdlib/erl_pp_throw/OTP-15751: stdlib: Fix a bug concerning exception class 'throw'
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/erl_pp_SUITE.erl37
1 files changed, 35 insertions, 2 deletions
diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl
index f5d80e7e68..e5d1910070 100644
--- a/lib/stdlib/test/erl_pp_SUITE.erl
+++ b/lib/stdlib/test/erl_pp_SUITE.erl
@@ -51,7 +51,7 @@
otp_6321/1, otp_6911/1, otp_6914/1, otp_8150/1, otp_8238/1,
otp_8473/1, otp_8522/1, otp_8567/1, otp_8664/1, otp_9147/1,
otp_10302/1, otp_10820/1, otp_11100/1, otp_11861/1, pr_1014/1,
- otp_13662/1, otp_14285/1, otp_15592/1]).
+ otp_13662/1, otp_14285/1, otp_15592/1, otp_15751/1]).
%% Internal export.
-export([ehook/6]).
@@ -81,7 +81,7 @@ groups() ->
[otp_6321, otp_6911, otp_6914, otp_8150, otp_8238,
otp_8473, otp_8522, otp_8567, otp_8664, otp_9147,
otp_10302, otp_10820, otp_11100, otp_11861, pr_1014, otp_13662,
- otp_14285, otp_15592]}].
+ otp_14285, otp_15592, otp_15751]}].
init_per_suite(Config) ->
Config.
@@ -1172,6 +1172,39 @@ otp_15592(_Config) ->
"56789012345678901234:f(<<>>)">>),
ok.
+otp_15751(_Config) ->
+ ok = pp_expr(<<"try foo:bar()
+ catch
+ Reason : Stacktrace ->
+ {Reason, Stacktrace}
+ end">>),
+ ok = pp_expr(<<"try foo:bar()
+ catch
+ throw: Reason : Stacktrace ->
+ {Reason, Stacktrace}
+ end">>),
+ ok = pp_expr(<<"try foo:bar()
+ catch
+ Reason : _ ->
+ Reason
+ end">>),
+ ok = pp_expr(<<"try foo:bar()
+ catch
+ throw: Reason : _ ->
+ Reason
+ end">>),
+ ok = pp_expr(<<"try foo:bar()
+ catch
+ Reason ->
+ Reason
+ end">>),
+ ok = pp_expr(<<"try foo:bar()
+ catch
+ throw: Reason ->
+ Reason
+ end">>),
+ ok.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
compile(Config, Tests) ->