From e10e918f3c08245949297e5ff1483752dd196e88 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 20 Mar 2014 14:59:48 +0100 Subject: Remove orber/cos*/ic files from encoding test These applications contains generated code with the latin1 directivce. --- erts/test/otp_SUITE.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'erts') diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl index 1fb452501f..cd5cfcbab4 100644 --- a/erts/test/otp_SUITE.erl +++ b/erts/test/otp_SUITE.erl @@ -328,7 +328,9 @@ erl_file_encoding(_Config) -> Wc = filename:join([Root,"**","*.erl"]), ErlFiles = ordsets:subtract(ordsets:from_list(filelib:wildcard(Wc)), release_files(Root, "*.erl")), + {ok, MP} = re:compile(".*lib/(ic)|(orber)|(cos).*", [unicode]), Fs = [F || F <- ErlFiles, + filter_use_latin1_coding(F, MP), case epp:read_encoding(F) of none -> false; _ -> true @@ -342,6 +344,14 @@ erl_file_encoding(_Config) -> ?t:fail() end. +filter_use_latin1_coding(F, MP) -> + case re:run(F, MP) of + nomatch -> + true; + {match, _} -> + false + end. + xml_file_encoding(_Config) -> XmlFiles = xml_files(), Fs = [F || F <- XmlFiles, is_bad_encoding(F)], -- cgit v1.2.3