From 17a259e894b81345501643c50c88cb4e1c5ef69d Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 20 Jul 2010 15:21:32 +0000 Subject: [PATCH] Wire the regex tests up to the reports --- Makefile.in | 1 + configure.in | 1 + unit-tests/regex/TESTS | 1 + unit-tests/regex/matcher_t.expected | 16 ++++++++++++++++ 4 files changed, 19 insertions(+) create mode 100644 unit-tests/regex/TESTS create mode 100644 unit-tests/regex/matcher_t.expected diff --git a/Makefile.in b/Makefile.in index 785cb0f53..70da68bfd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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) diff --git a/configure.in b/configure.in index db1376f99..e25d7f70c 100644 --- a/configure.in +++ b/configure.in @@ -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 index 000000000..5c379d52d --- /dev/null +++ b/unit-tests/regex/TESTS @@ -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 index 000000000..aaf071c57 --- /dev/null +++ b/unit-tests/regex/matcher_t.expected @@ -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]+ -- 2.43.5