From 1433460dd96b393c8403a99a3a83608e4f07d025 Mon Sep 17 00:00:00 2001 From: Dmitry Mikhirev Date: Wed, 17 Dec 2014 18:34:27 +0300 Subject: added pcre_subst function --- tests.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tests.mk') diff --git a/tests.mk b/tests.mk index dcbaa58..b131500 100644 --- a/tests.mk +++ b/tests.mk @@ -2,10 +2,10 @@ ifneq ($(findstring 4.,$(MAKE_VERSION)),4.) $(error you need GNU make 4.x to run tests) endif -tests = test001 test002 test003 test004 test005 test006 test007 test008 \ - test009 test010 +NUMTESTS = 23 +tests := $(foreach num,$(shell seq -f%03g $(NUMTESTS)),test$(num)) --load pcre.so +load pcre.so all: $(tests) @@ -55,6 +55,21 @@ test010 = -n "$(shell \ ) | $(MAKE) -f - 2>&1 | \ fgrep Stop.)" +# test pattern substitution +test011 = "$(s a,x,a)" = "x" +test012 = "$(s a,x,abcd)" = "xbcd" +test013 = "$(s a,x,dcba)" = "dcbx" +test014 = "$(s a,x,abba,g)" = "xbbx" +test015 = "$(s a,xxx,a)" = "xxx" +test016 = "$(s a,xxx,abcd)" = "xxxbcd" +test017 = "$(s a,xxx,dcba)" = "dcbxxx" +test018 = "$(s a,xxx,abba,g)" = "xxxbbxxx" +test019 = "$(s aaa,x,aaa)" = "x" +test020 = "$(s aaa,x,aaabcd)" = "xbcd" +test021 = "$(s aaa,x,dcbaaa)" = "dcbx" +test022 = "$(s aaa,x,aaabbaaa,g)" = "xbbx" +test023 = "$(s a,x,aaa,g)" = "xxx" + ### END OF TEST EXPRESSIONS ### test%: -- cgit v1.2.1