aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-12-21 11:31:09 +0100
committerBjörn Gustavsson <[email protected]>2010-12-21 11:31:09 +0100
commit2d69a4f735967fbc40b55df2c85f1851cb7c46bb (patch)
treeb3285001cbd1008067a133977cafb1f53be8a876 /lib/stdlib/test
parentf026b83b15b144965ae2013eaeae320dd16b3c10 (diff)
parentb36c9d12d7960c06872d866c25a913eb45b957bc (diff)
downloadotp-2d69a4f735967fbc40b55df2c85f1851cb7c46bb.tar.gz
otp-2d69a4f735967fbc40b55df2c85f1851cb7c46bb.tar.bz2
otp-2d69a4f735967fbc40b55df2c85f1851cb7c46bb.zip
Merge branch 'bjorn/bs-zero-width-bug/OTP-8997' into dev
* bjorn/bs-zero-width-bug/OTP-8997: Fix type-checking of variable used in zero-width bit syntax construction
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/erl_eval_SUITE.erl16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/stdlib/test/erl_eval_SUITE.erl b/lib/stdlib/test/erl_eval_SUITE.erl
index c60a558fa1..254ce0095d 100644
--- a/lib/stdlib/test/erl_eval_SUITE.erl
+++ b/lib/stdlib/test/erl_eval_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,7 +38,8 @@
otp_8133/1,
funs/1,
try_catch/1,
- eval_expr_5/1]).
+ eval_expr_5/1,
+ zero_width/1]).
%%
%% Define to run outside of test server
@@ -76,7 +77,8 @@ all(suite) ->
[guard_1, guard_2, match_pattern, string_plusplus, pattern_expr,
match_bin, guard_3, guard_4,
lc, simple_cases, unary_plus, apply_atom, otp_5269, otp_6539, otp_6543,
- otp_6787, otp_6977, otp_7550, otp_8133, funs, try_catch, eval_expr_5].
+ otp_6787, otp_6977, otp_7550, otp_8133, funs, try_catch, eval_expr_5,
+ zero_width].
guard_1(doc) ->
["(OTP-2405)"];
@@ -1326,6 +1328,14 @@ eval_expr_5(Config) when is_list(Config) ->
ok
end.
+zero_width(Config) when is_list(Config) ->
+ ?line check(fun() ->
+ {'EXIT',{badarg,_}} = (catch <<not_a_number:0>>),
+ ok
+ end, "begin {'EXIT',{badarg,_}} = (catch <<not_a_number:0>>), "
+ "ok end.", ok),
+ ok.
+
%% Check the string in different contexts: as is; in fun; from compiled code.
check(F, String, Result) ->
check1(F, String, Result),