Module Name: src
Committed By: rillig
Date: Sat Oct 3 15:21:13 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: shell-csh.exp shell-csh.mk
Log Message:
make(1): refine test for printing commands using csh
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/shell-csh.exp \
src/usr.bin/make/unit-tests/shell-csh.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/shell-csh.exp
diff -u src/usr.bin/make/unit-tests/shell-csh.exp:1.1 src/usr.bin/make/unit-tests/shell-csh.exp:1.2
--- src/usr.bin/make/unit-tests/shell-csh.exp:1.1 Sat Oct 3 14:39:36 2020
+++ src/usr.bin/make/unit-tests/shell-csh.exp Sat Oct 3 15:21:12 2020
@@ -1,4 +1,8 @@
-true normal
-true always
-true ignore errors
+echo normal
+normal
+hidden
+echo always
+always
+echo ignore errors
+ignore errors
exit status 0
Index: src/usr.bin/make/unit-tests/shell-csh.mk
diff -u src/usr.bin/make/unit-tests/shell-csh.mk:1.1 src/usr.bin/make/unit-tests/shell-csh.mk:1.2
--- src/usr.bin/make/unit-tests/shell-csh.mk:1.1 Sat Oct 3 14:39:36 2020
+++ src/usr.bin/make/unit-tests/shell-csh.mk Sat Oct 3 15:21:12 2020
@@ -1,13 +1,18 @@
-# $NetBSD: shell-csh.mk,v 1.1 2020/10/03 14:39:36 rillig Exp $
+# $NetBSD: shell-csh.mk,v 1.2 2020/10/03 15:21:12 rillig Exp $
#
# Tests for using a C shell for running the commands.
.SHELL: name="csh" path="csh"
-# Contrary to sh and ksh, the csh does not know the ':' command.
-# Therefore this test uses 'true' instead.
all:
- true normal
- @true hidden
- +true always
- -true ignore errors
+ # This command is both printed and executed.
+ echo normal
+
+ # This command is only executed.
+ @echo hidden
+
+ # This command is both printed and executed.
+ +echo always
+
+ # This command is both printed and executed.
+ -echo ignore errors