X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fovsdb-data.at;h=708ed9055b8ab9078d4964ed5c9eae0fded7a027;hb=bfe8e67ad595348f228938663956c3b8325997c5;hp=03ec3b33aac792dcad6185b13190d644b6ba2d71;hpb=0d0f05b909b6428d44eb147bd4edd73782d2a137;p=sliver-openvswitch.git diff --git a/tests/ovsdb-data.at b/tests/ovsdb-data.at index 03ec3b33a..708ed9055 100644 --- a/tests/ovsdb-data.at +++ b/tests/ovsdb-data.at @@ -290,8 +290,17 @@ constraint violation: -11 is not in the valid range -10 to 10 (inclusive) constraint violation: 11 is not in the valid range -10 to 10 (inclusive) constraint violation: 123576 is not in the valid range -10 to 10 (inclusive)]) -OVSDB_CHECK_POSITIVE([strings matching /(a(b)?)c?/], - [[parse-atoms '{"type": "string", "reMatch": "(a(b)?)?c?"}' \ +AT_SETUP([strings matching /(a(b)?)c?/]) +AT_KEYWORDS([ovsdb positive]) +if test "$HAVE_PCRE" = yes; then + b_out='constraint violation: "b" does not match regular expression /(a(b)?)?c?/' + bc_out='constraint violation: "bc" does not match regular expression /(a(b)?)?c?/' +else + b_out='"b"' + bc_out='"bc"' +fi +AT_CHECK_UNQUOTED( + [[test-ovsdb parse-atoms '{"type": "string", "reMatch": "(a(b)?)?c?"}' \ '[""]' \ '["a"]' \ '["ab"]' \ @@ -300,14 +309,17 @@ OVSDB_CHECK_POSITIVE([strings matching /(a(b)?)c?/], '["b"]' \ '["bc"]' \ '["c"]']], + [0], [["" "a" "ab" "abc" "ac" -constraint violation: "b" does not match regular expression /(a(b)?)?c?/ -constraint violation: "bc" does not match regular expression /(a(b)?)?c?/ -"c"]]) +$b_out +$bc_out +"c" +]]) +AT_CLEANUP OVSDB_CHECK_POSITIVE([strings at least 2 characters long], [[parse-atoms '{"type": "string", "minLength": 2}' \