diff options
author | Björn Gustavsson <[email protected]> | 2015-11-16 15:34:32 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-11-16 16:11:51 +0100 |
commit | 7fc200b2f54d0c4b1dbc9edaee1fa6005a230d35 (patch) | |
tree | eb96026f21dfd7c1b53b4611c76d1c657f240158 /lib/stdlib/test | |
parent | 9bdd69a560765931cdd5dac50c8c8389263a2f6b (diff) | |
download | otp-7fc200b2f54d0c4b1dbc9edaee1fa6005a230d35.tar.gz otp-7fc200b2f54d0c4b1dbc9edaee1fa6005a230d35.tar.bz2 otp-7fc200b2f54d0c4b1dbc9edaee1fa6005a230d35.zip |
epp_SUITE: Add test of -extends()
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/epp_SUITE.erl | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl index 199d2f193d..d2715216d3 100644 --- a/lib/stdlib/test/epp_SUITE.erl +++ b/lib/stdlib/test/epp_SUITE.erl @@ -27,7 +27,7 @@ pmod/1, not_circular/1, skip_header/1, otp_6277/1, otp_7702/1, otp_8130/1, overload_mac/1, otp_8388/1, otp_8470/1, otp_8503/1, otp_8562/1, otp_8665/1, otp_8911/1, otp_10302/1, otp_10820/1, - otp_11728/1, encoding/1]). + otp_11728/1, encoding/1, extends/1]). -export([epp_parse_erl_form/2]). @@ -70,7 +70,7 @@ all() -> not_circular, skip_header, otp_6277, otp_7702, otp_8130, overload_mac, otp_8388, otp_8470, otp_8503, otp_8562, otp_8665, otp_8911, otp_10302, otp_10820, otp_11728, - encoding]. + encoding, extends]. groups() -> [{upcase_mac, [], [upcase_mac_1, upcase_mac_2]}, @@ -1476,6 +1476,20 @@ encoding(Config) when is_list(Config) -> epp_parse_file(ErlFile, [{default_encoding,utf8},extra]), ok. +extends(Config) -> + Cs = [{extends_c1, + <<"-extends(some.other.module).\n">>, + {errors,[{1,erl_parse,["syntax error before: ","'.'"]}],[]}}], + [] = compile(Config, Cs), + + Ts = [{extends_1, + <<"-extends(some_other_module).\n" + "t() -> {?BASE_MODULE,?BASE_MODULE_STRING}.\n">>, + {some_other_module,"some_other_module"}}], + + [] = run(Config, Ts), + ok. + check(Config, Tests) -> eval_tests(Config, fun check_test/2, Tests). |