diff options
author | Patrik Nyblom <[email protected]> | 2013-02-22 12:06:41 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-02-22 12:06:41 +0100 |
commit | 7215c49aff685e93765598cd428baf1d4320f752 (patch) | |
tree | 76409af3ed6abe7502af3aa438e47b1be98df1e3 /lib/stdlib/test/epp_SUITE.erl | |
parent | 14820e983856654e68e08244e4dfc689f0804fd8 (diff) | |
parent | 2a79b74ac371387ce338bacf979f9ca32447b302 (diff) | |
download | otp-7215c49aff685e93765598cd428baf1d4320f752.tar.gz otp-7215c49aff685e93765598cd428baf1d4320f752.tar.bz2 otp-7215c49aff685e93765598cd428baf1d4320f752.zip |
Merge branch 'pan/unicode_printable_ranges'
* pan/unicode_printable_ranges:
Adapt stdlib tests to ~tp detecting latin1 binaries
Update primary bootstrap
Make wx debugger use +pc flag when applicable
Correct misspelled comments and space at lin ends
Make ~tp output latin1 binaries as strings if possible
Leave the +pc handling to io and io_lib_pretty
Remove newly introduced warning in erlexec.c
Make shell_SUITE:otp_10302 use +pc unicode when needed
Fix io_proto_SUITE to handle the new io_lib_pretty:print
Add testcase for +pc and io:printable_range/0
Make printing of UTF-8 in binaries behave like lists.
Document +pc flag and io:printable_range/0
Add usage of and spec for io:printable_range/0
Add +pc {latin1|unicode} switch and io:printable_range/0
Fix some Unicode issues
OTP-18084
Diffstat (limited to 'lib/stdlib/test/epp_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/epp_SUITE.erl | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl index 041d521514..b2f1aa955a 100644 --- a/lib/stdlib/test/epp_SUITE.erl +++ b/lib/stdlib/test/epp_SUITE.erl @@ -25,7 +25,7 @@ variable_1/1, otp_4870/1, otp_4871/1, otp_5362/1, 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_8562/1, otp_8665/1, otp_8911/1, otp_10302/1, otp_10820/1]). -export([epp_parse_erl_form/2]). @@ -67,7 +67,7 @@ all() -> {group, variable}, otp_4870, otp_4871, otp_5362, pmod, 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_8665, otp_8911, otp_10302, otp_10820]. groups() -> [{upcase_mac, [], [upcase_mac_1, upcase_mac_2]}, @@ -1359,6 +1359,30 @@ encoding_nocom(Enc, File) -> ok = file:close(Fd), E = epp:read_encoding(File, Options). +otp_10820(doc) -> + "OTP-10820. Unicode filenames."; +otp_10820(suite) -> + []; +otp_10820(Config) when is_list(Config) -> + L = [915,953,959,973,957,953,954,959,957,964], + Dir = ?config(priv_dir, Config), + File = filename:join(Dir, L++".erl"), + C1 = <<"%% coding: utf-8\n -module(any).">>, + ok = do_otp_10820(File, C1, "+pc latin1"), + ok = do_otp_10820(File, C1, "+pc unicode"), + C2 = <<"\n-module(any).">>, + ok = do_otp_10820(File, C2, "+pc latin1"), + ok = do_otp_10820(File, C2, "+pc unicode"). + +do_otp_10820(File, C, PC) -> + {ok,Node} = start_node(erl_pp_helper, "+fnu " ++ PC), + ok = rpc:call(Node, file, write_file, [File, C]), + {ok,[{attribute,1,file,{File,1}}, + {attribute,2,module,any}, + {eof,2}]} = rpc:call(Node, epp, parse_file, [File, [],[]]), + true = test_server:stop_node(Node), + ok. + check(Config, Tests) -> eval_tests(Config, fun check_test/2, Tests). @@ -1475,3 +1499,8 @@ ln2({error,M}) -> {error,ln2(M)}; ln2(M) -> M. + +%% +fnu means a peer node has to be started; slave will not do +start_node(Name, Xargs) -> + ?line PA = filename:dirname(code:which(?MODULE)), + test_server:start_node(Name, peer, [{args, "-pa " ++ PA ++ " " ++ Xargs}]). |