Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): clean up tests error.mk and...



details:   https://anonhg.NetBSD.org/src/rev/7fa30f5e8c31
branches:  trunk
changeset: 942010:7fa30f5e8c31
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 03 17:38:45 2020 +0000

description:
make(1): clean up tests error.mk and escape.mk

diffstat:

 usr.bin/make/unit-tests/error.exp |   6 +++---
 usr.bin/make/unit-tests/error.mk  |  10 ++++++----
 usr.bin/make/unit-tests/escape.mk |   6 +++---
 3 files changed, 12 insertions(+), 10 deletions(-)

diffs (60 lines):

diff -r 96e9b73ca42b -r 7fa30f5e8c31 usr.bin/make/unit-tests/error.exp
--- a/usr.bin/make/unit-tests/error.exp Tue Nov 03 17:37:57 2020 +0000
+++ b/usr.bin/make/unit-tests/error.exp Tue Nov 03 17:38:45 2020 +0000
@@ -1,6 +1,6 @@
-make: "error.mk" line 3: just FYI
-make: "error.mk" line 4: warning: this could be serious
-make: "error.mk" line 5: this is fatal
+make: "error.mk" line 6: just FYI
+make: "error.mk" line 7: warning: this could be serious
+make: "error.mk" line 8: this is fatal
 
 make: stopped in unit-tests
 exit status 1
diff -r 96e9b73ca42b -r 7fa30f5e8c31 usr.bin/make/unit-tests/error.mk
--- a/usr.bin/make/unit-tests/error.mk  Tue Nov 03 17:37:57 2020 +0000
+++ b/usr.bin/make/unit-tests/error.mk  Tue Nov 03 17:38:45 2020 +0000
@@ -1,10 +1,12 @@
-# $NetBSD: error.mk,v 1.2 2020/10/24 08:34:59 rillig Exp $
+# $NetBSD: error.mk,v 1.3 2020/11/03 17:38:45 rillig Exp $
+#
+# Demonstrate that the .error directive exits immediately, without
+# continuing parsing until the end of the file.
 
 .info just FYI
 .warning this could be serious
 .error this is fatal
+.info this is not reached because of the .error above
 
 all:
-
-.info.html:
-       @echo this should be ignored
+       : this is not reached because of the .error
diff -r 96e9b73ca42b -r 7fa30f5e8c31 usr.bin/make/unit-tests/escape.mk
--- a/usr.bin/make/unit-tests/escape.mk Tue Nov 03 17:37:57 2020 +0000
+++ b/usr.bin/make/unit-tests/escape.mk Tue Nov 03 17:38:45 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: escape.mk,v 1.13 2020/10/24 08:50:17 rillig Exp $
+# $NetBSD: escape.mk,v 1.14 2020/11/03 17:38:45 rillig Exp $
 #
 # Test backslash escaping.
 
@@ -187,7 +187,7 @@
 # Backslash-newline in a command is retained.
 #
 # The "#" in "# second line without space" makes it a comment instead
-# of a syntax error if the preceding line is parsed incorretly.
+# of a syntax error if the preceding line is parsed incorrectly.
 # The ":" in "third line':" makes it look like the start of a
 # target instead of a syntax error if the first line is parsed incorrectly.
 #
@@ -220,7 +220,7 @@
 # XXX: This may differ from POSIX, but matches gmake.
 #
 # When make passes two backslashes to the shell, the shell will pass one
-# backslash to the echo commant.
+# backslash to the echo command.
 #
 all: cmd-2bsnl
 cmd-2bsnl: .PHONY



Home | Main Index | Thread Index | Old Index