]> sourceware.org Git - lvm2.git/commitdiff
Wire the regex tests up to the reports
authorJoe Thornber <joe@fib011235813.fsnet.co.uk>
Tue, 20 Jul 2010 15:21:32 +0000 (15:21 +0000)
committerJoe Thornber <joe@fib011235813.fsnet.co.uk>
Tue, 20 Jul 2010 15:21:32 +0000 (15:21 +0000)
Makefile.in
configure.in
unit-tests/regex/TESTS [new file with mode: 0644]
unit-tests/regex/matcher_t.expected [new file with mode: 0644]

index 785cb0f53898ec158c0d9a6badbd238cf49e02e1..70da68bfdd2e81d8655d78b0c30ffebd90e87e72 100644 (file)
@@ -135,6 +135,7 @@ RUBY=ruby1.9 -Ireport-generators/lib -Ireport-generators/test
 .PHONEY: unit-test ruby-test test-programs
 
 test-programs:
+       $(MAKE) unit-tests/regex
 
 unit-test: test-programs
        $(RUBY) report-generators/unit_test.rb $(shell find . -name TESTS)
index db1376f99103ec978f0bc59ed2b69260e0a47183..e25d7f70c9c45f0811504d15732b0d04a009c6f1 100644 (file)
@@ -1333,6 +1333,7 @@ test/Makefile
 test/api/Makefile
 tools/Makefile
 udev/Makefile
+unit-tests/regex/Makefile
 ])
 AC_OUTPUT
 
diff --git a/unit-tests/regex/TESTS b/unit-tests/regex/TESTS
new file mode 100644 (file)
index 0000000..5c379d5
--- /dev/null
@@ -0,0 +1 @@
+dfa matching:$TEST_TOOL ./matcher_t dev_patterns < devices.list > matcher_t.output && diff -u matcher_t.expected matcher_t.output
\ No newline at end of file
diff --git a/unit-tests/regex/matcher_t.expected b/unit-tests/regex/matcher_t.expected
new file mode 100644 (file)
index 0000000..aaf071c
--- /dev/null
@@ -0,0 +1,16 @@
+Matcher built with 23 dfa states
+/dev/loop/0 : loop/[0-9]+
+/dev/loop/1 : loop/[0-9]+
+/dev/loop/2 : loop/[0-9]+
+/dev/loop/3 : loop/[0-9]+
+/dev/loop/4 : loop/[0-9]+
+/dev/loop/5 : loop/[0-9]+
+/dev/loop/6 : loop/[0-9]+
+/dev/loop/7 : loop/[0-9]+
+/dev/hda1 : hd[a-d][0-5]+
+/dev/hda2 : hd[a-d][0-5]+
+/dev/hda3 : hd[a-d][0-5]+
+/dev/hda4 : hd[a-d][0-5]+
+/dev/hda5 : hd[a-d][0-5]+
+/dev/hdb1 : hd[a-d][0-5]+
+/dev/hdc1 : hd[a-d][0-5]+
This page took 0.042905 seconds and 5 git commands to generate.