aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicael Karlberg <bmk@erlang.org>2013-01-25 12:41:37 +0100
committerMicael Karlberg <bmk@erlang.org>2013-01-25 12:41:37 +0100
commiteb709715f44e09d1c25c2ed47f11f44137166e00 (patch)
tree182be42e7aa87e70bdbc0e5c8c2e1a12f2246638
parent2599b33b71f78ee2f1ab4a5e2db4a1815e471506 (diff)
downloadotp-eb709715f44e09d1c25c2ed47f11f44137166e00.tar.gz
otp-eb709715f44e09d1c25c2ed47f11f44137166e00.tar.bz2
otp-eb709715f44e09d1c25c2ed47f11f44137166e00.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}).