From 2552a55b8082ebf502cc4dd3b406258ee0977fea Mon Sep 17 00:00:00 2001 From: Dmitry Mikhirev Date: Thu, 18 Dec 2014 14:55:55 +0300 Subject: expand replacement string just before substitution, after vars set --- tests.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests.mk') diff --git a/tests.mk b/tests.mk index 10e34c8..3f40808 100644 --- a/tests.mk +++ b/tests.mk @@ -2,7 +2,7 @@ ifneq ($(findstring 4.,$(MAKE_VERSION)),4.) $(error you need GNU make 4.x to run tests) endif -NUMTESTS = 23 +NUMTESTS = 25 tests := $(foreach num,$(shell seq -f%03g $(NUMTESTS)),test$(num)) load pcre.so @@ -74,6 +74,10 @@ test021 = "$(s aaa,x,dcbaaa)" = "dcbx" test022 = "$(s aaa,x,aaabbaaa,g)" = "xbbx" test023 = "$(s a,x,aaa,g)" = "xxx" +# test expansion of substituted string +test024 = "$(s a(.),$(1),aaabac,g)" = "abc" +test025 = "$(s (?.)a,$(var),aabaca,g)" = "abc" + ### END OF TEST EXPRESSIONS ### test%: -- cgit v1.2.1