chiark / gitweb /
test/filter; Cause some warnings, to check they appear
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 28 Dec 2019 12:58:03 +0000 (12:58 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 11:35:16 +0000 (11:35 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter/Dir.mk.expected
tests/filter/Dir.sd.mk
tests/filter/stderr.expected

index f3e3577..14cc88a 100644 (file)
@@ -2,6 +2,16 @@
 # Prefix in .
 # test cases for generate script
 
+# some blank/comment lines to make "saw WARN" come out with 1-
+# and 2-digit line numbers
+
+WARN += 3
+TOP_WARN += 3
+# $WARN
+# $(WARN)
+# $(TOP_WARN)
+# $(TOP_WARN)
+
 ${eval ${call  some-macro, 42, $$x, {  $(foreach something) } }}
 
 # doctests:
index 559a40c..3a20de3 100644 (file)
@@ -1,5 +1,15 @@
 # test cases for generate script
 
+# some blank/comment lines to make "saw WARN" come out with 1-
+# and 2-digit line numbers
+
+WARN += 3
+&WARN += 3
+# $WARN
+# $(WARN)
+# $(&WARN)
+# &$WARN
+
 &${ some-macro, 42, $x, { &$- $(foreach something) } }
 
 # doctests:
index e69de29..0700625 100644 (file)
@@ -0,0 +1,7 @@
+subdirmk: warning: ./Dir.sd.mk:8: possibly confusing unbracketed single-char $-expansion
+subdirmk: warning: saw both WARN and &WARN
+ saw WARN at ./Dir.sd.mk:6
+ saw WARN at ./Dir.sd.mk:9
+ saw &WARN at ./Dir.sd.mk:7
+ saw &WARN at ./Dir.sd.mk:10
+ saw &WARN at ./Dir.sd.mk:11