|  | 
| 25 | 25 | -include_lib("eunit/include/eunit.hrl"). | 
| 26 | 26 | 
 | 
| 27 | 27 | %% Test server specific exports | 
| 28 |  | --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,  | 
|  | 28 | +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, | 
| 29 | 29 | 	 init_per_group/2,end_per_group/2]). | 
| 30 | 30 | 
 | 
| 31 | 31 | %% Test cases | 
| 32 | 32 | -export([merl_smoke_test/1, | 
| 33 |  | -         transform_parse_error_test/1, otp_15291/1]). | 
|  | 33 | +         transform_parse_error_test/1, otp_15291/1, | 
|  | 34 | +         compile_and_load_with_comments/1]). | 
| 34 | 35 | 
 | 
| 35 | 36 | suite() -> [{ct_hooks,[ts_install_cth]}]. | 
| 36 | 37 | 
 | 
| 37 | 38 | all() -> | 
| 38 | 39 |     [merl_smoke_test, | 
| 39 | 40 |      transform_parse_error_test, | 
| 40 |  | -     otp_15291]. | 
|  | 41 | +     otp_15291, | 
|  | 42 | +     compile_and_load_with_comments]. | 
| 41 | 43 | 
 | 
| 42 | 44 | groups() ->  | 
| 43 | 45 |     []. | 
| @@ -112,6 +114,18 @@ otp_15291(_Config) -> | 
| 112 | 114 |     {clause,A1,[{var,A1,'_'}],[],[{atom,A1,ok}]} = C1, | 
| 113 | 115 |     ok. | 
| 114 | 116 | 
 | 
|  | 117 | +compile_and_load_with_comments(_Config) -> | 
|  | 118 | +    ?assertMatch({ok, _}, | 
|  | 119 | +                 merl:compile_and_load(merl:quote( | 
|  | 120 | +                     ~"-module(merl_test_module_1)."))), | 
|  | 121 | +    ?assertMatch({ok, _}, | 
|  | 122 | +                 merl:compile_and_load(merl:quote( | 
|  | 123 | +                     ~"-module(merl_test_module_2). % comment"))), | 
|  | 124 | +    ?assertMatch({ok, _}, | 
|  | 125 | +                 merl:compile_and_load(merl:quote( | 
|  | 126 | +                     ~"\n-module(merl_test_module_3).\n% comment"))), | 
|  | 127 | +    ok. | 
|  | 128 | + | 
| 115 | 129 | %% utilities | 
| 116 | 130 | 
 | 
| 117 | 131 | f(Ts) when is_list(Ts) -> | 
|  | 
0 commit comments