aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2013-01-25 12:41:37 +0100
committerIngela Anderton Andin <[email protected]>2014-02-05 10:32:22 +0100
commit51641778f6db9d3d6d325f2f4ad20258a0fbf21e (patch)
treece50f58ab1a882bc77a46126abc3974279e42cb6
parent85a398ab59ed83db7825d8c03f573c23540acda6 (diff)
downloadotp-51641778f6db9d3d6d325f2f4ad20258a0fbf21e.tar.gz
otp-51641778f6db9d3d6d325f2f4ad20258a0fbf21e.tar.bz2
otp-51641778f6db9d3d6d325f2f4ad20258a0fbf21e.zip
[inets] Appup test suite now handles version REs
-rw-r--r--lib/inets/test/inets_appup_test.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/inets/test/inets_appup_test.erl b/lib/inets/test/inets_appup_test.erl
index 7ed237243e..648e373312 100644
--- a/lib/inets/test/inets_appup_test.erl
+++ b/lib/inets/test/inets_appup_test.erl
@@ -257,6 +257,21 @@ check_instruction(_, Instr, _AllInstr, _Modules) ->
check_version(V) when is_list(V) ->
ok;
+check_version(REBin) when is_binary(REBin) ->
+ try
+ begin
+ RE = binary_to_list(REBin),
+ case re:compile(RE) of
+ {ok, _} ->
+ ok;
+ {error, _} ->
+ error({bad_version, REBin})
+ end
+ end
+ catch
+ _T:_E ->
+ error({bad_version, REBin})
+ end;
check_version(V) ->
error({bad_version, V}).