diff options
author | Björn Gustavsson <[email protected]> | 2016-08-22 14:39:22 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-08-22 14:39:22 +0200 |
commit | bbcfcb140c56324df1989fd9de440e76f0c74a25 (patch) | |
tree | 841a76c6da006520a520f0b4c88390e2d2b662c9 /lib/syntax_tools/test | |
parent | 2c1897c6ca6d4bfa4e30ebfd64dcfa807a596a51 (diff) | |
parent | fee45935eb7f5a098cbbbaf1c8d1a8f9a77ce418 (diff) | |
download | otp-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/test')
-rw-r--r-- | lib/syntax_tools/test/merl_SUITE.erl | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/syntax_tools/test/merl_SUITE.erl b/lib/syntax_tools/test/merl_SUITE.erl index 945972d405..52bbd9b3b8 100644 --- a/lib/syntax_tools/test/merl_SUITE.erl +++ b/lib/syntax_tools/test/merl_SUITE.erl @@ -29,12 +29,14 @@ init_per_group/2,end_per_group/2]). %% Test cases --export([merl_smoke_test/1]). +-export([merl_smoke_test/1, + transform_parse_error_test/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> - [merl_smoke_test]. + [merl_smoke_test, + transform_parse_error_test]. groups() -> []. @@ -84,6 +86,21 @@ merl_smoke_test(Config) when is_list(Config) -> end)), ok. +transform_parse_error_test(_Config) -> + ?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}])")], []))), + ok. + %% utilities f(Ts) when is_list(Ts) -> |