Skip to content

Commit c7fbc4c

Browse files
committed
Add DSUB integration testss
1 parent 654f41c commit c7fbc4c

11 files changed

Lines changed: 36 additions & 9 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ coverage-utests.html: utest
9797
## Lint the code using `gawk`
9898
# Warnings to ignore have been stripped below
9999
.PHONY: lint
100-
lint: UNINIT := (|SUB|COLOR_.*|VARS|OFFSET|PADDING|DEPRECATED|RECIPEPREFIX|AWK|\
100+
lint: UNINIT := (sub_array|COLOR_.*|VARS|OFFSET|PADDING|DEPRECATED|RECIPEPREFIX|AWK|\
101101
|TARGETS_REGEX|VARIABLES_REGEX|OUTPUT_FORMAT|EXPORT_THEME|UNIT_TEST)
102102
lint: override AWK := awk
103103
lint: check-variables
@@ -106,7 +106,7 @@ lint: check-variables
106106
-v UNIT_TEST=0 \
107107
$(UNIT_TESTS_AWK_FLAGS) \
108108
-f $(MAKEFILE_DOC) 2>&1 | \
109-
grep -vE "reference to uninitialized variable \`$(UNINIT)'" || echo "lint: OK"
109+
grep -vE "reference to uninitialized .* \`$(UNINIT)'" || echo "lint: OK"
110110

111111
# Verify for unintended global variables
112112
.PHONY: check-variables

test/Makefile.dsub

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Description with a dsub: $(VAR)
2+
t1:
3+
4+
t2: ## This description refers to $(VAR) as well
5+
6+
## $(VAR) and
7+
## $(Y) will both be replaced
8+
X :=
9+
10+
## SUB and DSUB $(complement) each other ($(Y)):
11+
t3:

test/integration/test-dsub

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-v SUB='t3:target3:v1 v2' -v DSUB='$(Y):S~y;$(VAR):S~var' test/Makefile.dsub
2+
-----------------------
3+
Available targets:
4+
-----------------------
5+
t1  Description with a dsub: S~var
6+
t2  This description refers to S~var as well
7+
target3 SUB and DSUB $(complement) each other (S~y):
8+
v1
9+
v2
10+
11+
-----------------------
12+
Command-line arguments:
13+
-----------------------
14+
X  S~var and
15+
S~y will both be replaced
16+
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-v SUB='<L:1>$(TARGET):counter-:one two three;<L:0>AWK:awk mawk nawk bawk wak goawk' test/Makefile.substitutions
1+
-v SUB='<L:1>$(TARGET):counter-:one two three;<L:0>AWK:awk mawk nawk bawk wak goawk' test/Makefile.sub
22
-----------------------
33
Available targets:
44
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-v SUB='<L:0>$(TARGET):renamed:' -v VARS=0 test/Makefile.substitutions
1+
-v SUB='<L:0>$(TARGET):renamed:' -v VARS=0 test/Makefile.sub
22
-----------------------
33
Available targets:
44
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-v SUB='<M:1,L:0>$(TARGET):counter-:one two three;<M:0,L:1>AWK:awk mawk nawk bawk wak goawk' test/Makefile.substitutions
1+
-v SUB='<M:1,L:0>$(TARGET):counter-:one two three;<M:0,L:1>AWK:awk mawk nawk bawk wak goawk' test/Makefile.sub
22
-----------------------
33
Available targets:
44
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-v SUB='<M:0>$(TARGET):counter-:one two three;<M:1>AWK:awk mawk nawk bawk wak goawk' test/Makefile.substitutions
1+
-v SUB='<M:0>$(TARGET):counter-:one two three;<M:1>AWK:awk mawk nawk bawk wak goawk' test/Makefile.sub
22
-----------------------
33
Available targets:
44
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-v SUB='<M:0,L:0,S: ,I:[,T:],N:2>$(TARGET):counter-:one two three;<M:1,L:1,P:+ ,N:3>AWK:awk mawk nawk bawk wak goawk' test/Makefile.substitutions
1+
-v SUB='<M:0,L:0,S: ,I:[,T:],N:2>$(TARGET):counter-:one two three;<M:1,L:1,P:+ ,N:3>AWK:awk mawk nawk bawk wak goawk' test/Makefile.sub
22
-----------------------
33
Available targets:
44
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-v SUB='<M:0,L:0,S: ,I:[,T:]>$(TARGET):counter-:one two three;<M:1,L:1,S:\\,,I:{,T:}>AWK:awk mawk nawk bawk wak goawk' test/Makefile.substitutions
1+
-v SUB='<M:0,L:0,S: ,I:[,T:]>$(TARGET):counter-:one two three;<M:1,L:1,S:\\,,I:{,T:}>AWK:awk mawk nawk bawk wak goawk' test/Makefile.sub
22
-----------------------
33
Available targets:
44
-----------------------

0 commit comments

Comments
 (0)