From 9c7425eee4ba09a08eeb73fffb945d7138f77ee4 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 9 Aug 2010 10:27:31 +0000 Subject: [PATCH] [REGEX] add a unit test for regexes containing chars with value over x80 --- unit-tests/regex/TESTS | 5 +++-- unit-tests/regex/matcher_t.expected3 | 3 +++ unit-tests/regex/nonprint_input | 4 ++++ unit-tests/regex/nonprint_regexes | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 unit-tests/regex/matcher_t.expected3 create mode 100644 unit-tests/regex/nonprint_input create mode 100644 unit-tests/regex/nonprint_regexes diff --git a/unit-tests/regex/TESTS b/unit-tests/regex/TESTS index c6ff39c2e..329794293 100644 --- a/unit-tests/regex/TESTS +++ b/unit-tests/regex/TESTS @@ -1,2 +1,3 @@ -dfa matching:$TEST_TOOL ./matcher_t dev_patterns < devices.list > matcher_t.output && diff -u matcher_t.expected matcher_t.output -dfa matching:$TEST_TOOL ./matcher_t random_regexes < /dev/null > matcher_t.output && diff -u matcher_t.expected2 matcher_t.output \ No newline at end of file +dfa matching:$TEST_TOOL ./matcher_t --fingerprint dev_patterns < devices.list > matcher_t.output && diff -u matcher_t.expected matcher_t.output +dfa matching:$TEST_TOOL ./matcher_t --fingerprint random_regexes < /dev/null > matcher_t.output && diff -u matcher_t.expected2 matcher_t.output +dfa with non-print regex chars:$TEST_TOOL ./matcher_t nonprint_regexes < nonprint_input > matcher_t.output && diff -u matcher_t.expected3 matcher_t.output \ No newline at end of file diff --git a/unit-tests/regex/matcher_t.expected3 b/unit-tests/regex/matcher_t.expected3 new file mode 100644 index 000000000..fa561497a --- /dev/null +++ b/unit-tests/regex/matcher_t.expected3 @@ -0,0 +1,3 @@ +foo€bar : € +fooÂb : fooÂb +€ : € diff --git a/unit-tests/regex/nonprint_input b/unit-tests/regex/nonprint_input new file mode 100644 index 000000000..92a1807fb --- /dev/null +++ b/unit-tests/regex/nonprint_input @@ -0,0 +1,4 @@ +foo.bar +foo€bar +fooÂb +€ diff --git a/unit-tests/regex/nonprint_regexes b/unit-tests/regex/nonprint_regexes new file mode 100644 index 000000000..e164c213c --- /dev/null +++ b/unit-tests/regex/nonprint_regexes @@ -0,0 +1,3 @@ +"foo€bar" +"fooÂb" +"€" -- 2.43.5