diff options
author | Hans Nilsson <[email protected]> | 2015-07-04 10:49:33 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-07-04 11:00:54 +0200 |
commit | e0694680a8b59641369a478b1aec58c2c2acc5d4 (patch) | |
tree | 30dc8225116e87ff6216697e70231674fa1cf171 /lib/ssh/test | |
parent | 99003f395207a23935bfd2859f9c7121da5110eb (diff) | |
download | otp-e0694680a8b59641369a478b1aec58c2c2acc5d4.tar.gz otp-e0694680a8b59641369a478b1aec58c2c2acc5d4.tar.bz2 otp-e0694680a8b59641369a478b1aec58c2c2acc5d4.zip |
ssh: add disjunction to ssh_trpt_test_lib:match
Diffstat (limited to 'lib/ssh/test')
-rw-r--r-- | lib/ssh/test/ssh_trpt_test_lib.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_trpt_test_lib.erl b/lib/ssh/test/ssh_trpt_test_lib.erl index a604fca1ac..75f495b6d7 100644 --- a/lib/ssh/test/ssh_trpt_test_lib.erl +++ b/lib/ssh/test/ssh_trpt_test_lib.erl @@ -218,6 +218,13 @@ match('$$', V, S) -> match('_', _, S) -> {true, S}; +match({'or',[P]}, V, S) -> match(P,V,S); +match({'or',[Ph|Pt]}, V, S) -> + case match(Ph,V,S) of + false -> match({'or',Pt}, V, S); + {true,S} -> {true,S} + end; + match(P, V, S) when is_atom(P) -> case atom_to_list(P) of "$"++_ -> |