aboutsummaryrefslogtreecommitdiff
path: root/unit-tests
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2010-08-09 10:27:31 +0000
committerJoe Thornber <thornber@redhat.com>2010-08-09 10:27:31 +0000
commit95aa395ddda23dad380332299a73fca663c068b4 (patch)
tree50f57f19837ca7557581699283260297d79fe7da /unit-tests
parent45035ffa1a52495813882e781ae79f4d73424a7d (diff)
downloadlvm2-95aa395ddda23dad380332299a73fca663c068b4.tar.gz
[REGEX] add a unit test for regexes containing chars with value over x80
Diffstat (limited to 'unit-tests')
-rw-r--r--unit-tests/regex/TESTS5
-rw-r--r--unit-tests/regex/matcher_t.expected33
-rw-r--r--unit-tests/regex/nonprint_input4
-rw-r--r--unit-tests/regex/nonprint_regexes3
4 files changed, 13 insertions, 2 deletions
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"
+"€"