aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2014-03-20 14:59:48 +0100
committerLars Thorsen <[email protected]>2014-03-28 10:21:07 +0100
commite10e918f3c08245949297e5ff1483752dd196e88 (patch)
treed91bc5806e1cc071226e7630845a246218dc622f /erts/test
parentae64b80ba7dd01b24b89836060151879502fcd96 (diff)
downloadotp-e10e918f3c08245949297e5ff1483752dd196e88.tar.gz
otp-e10e918f3c08245949297e5ff1483752dd196e88.tar.bz2
otp-e10e918f3c08245949297e5ff1483752dd196e88.zip
Remove orber/cos*/ic files from encoding test
These applications contains generated code with the latin1 directivce.
Diffstat (limited to 'erts/test')
-rw-r--r--erts/test/otp_SUITE.erl10
1 files changed, 10 insertions, 0 deletions
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)],