aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/src/merl_tests.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-08-22 14:39:22 +0200
committerBjörn Gustavsson <[email protected]>2016-08-22 14:39:22 +0200
commitbbcfcb140c56324df1989fd9de440e76f0c74a25 (patch)
tree841a76c6da006520a520f0b4c88390e2d2b662c9 /lib/syntax_tools/src/merl_tests.erl
parent2c1897c6ca6d4bfa4e30ebfd64dcfa807a596a51 (diff)
parentfee45935eb7f5a098cbbbaf1c8d1a8f9a77ce418 (diff)
downloadotp-bbcfcb140c56324df1989fd9de440e76f0c74a25.tar.gz
otp-bbcfcb140c56324df1989fd9de440e76f0c74a25.tar.bz2
otp-bbcfcb140c56324df1989fd9de440e76f0c74a25.zip
Merge branch 'gomoripeti/syntax_tools/merl-transform/PR-1123/OTP-13755' into maint
* gomoripeti/syntax_tools/merl-transform/PR-1123/OTP-13755: Fix infinite loop in merl_transform
Diffstat (limited to 'lib/syntax_tools/src/merl_tests.erl')
-rw-r--r--lib/syntax_tools/src/merl_tests.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/syntax_tools/src/merl_tests.erl b/lib/syntax_tools/src/merl_tests.erl
index c1aae3100e..27db594050 100644
--- a/lib/syntax_tools/src/merl_tests.erl
+++ b/lib/syntax_tools/src/merl_tests.erl
@@ -48,6 +48,21 @@ parse_error_test_() ->
f(merl:quote("{")))
].
+transform_parse_error_test_() ->
+ [?_assertEqual("merl:quote(\"{\")",
+ f(merl_transform:parse_transform(
+ [?Q("merl:quote(\"{\")")], []))),
+ ?_assertEqual("merl:quote(2, \"{\")",
+ f(merl_transform:parse_transform(
+ [?Q("merl:quote(2, \"{\")")], []))),
+ ?_assertEqual("merl:qquote(\"{\", [{var, V}])",
+ f(merl_transform:parse_transform(
+ [?Q("merl:qquote(\"{\", [{var, V}])")], []))),
+ ?_assertEqual("merl:qquote(2, \"{\", [{var, V}])",
+ f(merl_transform:parse_transform(
+ [?Q("merl:qquote(2, \"{\", [{var, V}])")], [])))
+ ].
+
term_test_() ->
[?_assertEqual(tuple, erl_syntax:type(merl:term({}))),
?_assertEqual("{foo, 42}", f(merl:term({foo, 42})))