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): add test for + commands wit...



details:   https://anonhg.NetBSD.org/src/rev/ae23e0bc8187
branches:  trunk
changeset: 942998:ae23e0bc8187
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 23 14:46:33 2020 +0000

description:
make(1): add test for + commands with the -n command line option

diffstat:

 usr.bin/make/unit-tests/Makefile            |  3 ++-
 usr.bin/make/unit-tests/sh-leading-plus.exp |  3 +++
 usr.bin/make/unit-tests/sh-leading-plus.mk  |  7 +++----
 3 files changed, 8 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r a133de4b059f -r ae23e0bc8187 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Sun Aug 23 14:28:04 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Sun Aug 23 14:46:33 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.118 2020/08/23 14:28:04 rillig Exp $
+# $NetBSD: Makefile,v 1.119 2020/08/23 14:46:33 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -334,6 +334,7 @@
 FLAGS.opt-warnings-as-errors= -W
 FLAGS.order=           -j1
 FLAGS.recursive=       -dL
+FLAGS.sh-leading-plus= -n
 FLAGS.vardebug=                -k -dv FROM_CMDLINE=
 FLAGS.varmod-match-escape= -dv
 FLAGS.varname-dot-shell= -dpv
diff -r a133de4b059f -r ae23e0bc8187 usr.bin/make/unit-tests/sh-leading-plus.exp
--- a/usr.bin/make/unit-tests/sh-leading-plus.exp       Sun Aug 23 14:28:04 2020 +0000
+++ b/usr.bin/make/unit-tests/sh-leading-plus.exp       Sun Aug 23 14:46:33 2020 +0000
@@ -1,1 +1,4 @@
+echo 'this command is not run'
+echo 'this command is run'
+this command is run
 exit status 0
diff -r a133de4b059f -r ae23e0bc8187 usr.bin/make/unit-tests/sh-leading-plus.mk
--- a/usr.bin/make/unit-tests/sh-leading-plus.mk        Sun Aug 23 14:28:04 2020 +0000
+++ b/usr.bin/make/unit-tests/sh-leading-plus.mk        Sun Aug 23 14:46:33 2020 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: sh-leading-plus.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: sh-leading-plus.mk,v 1.3 2020/08/23 14:46:33 rillig Exp $
 #
 # Tests for shell commands preceded by a '+', to run them even if
 # the command line option -n is given.
 
-# TODO: Implementation
-
 all:
-       @:;
+       @echo 'this command is not run'
+       @+echo 'this command is run'



Home | Main Index | Thread Index | Old Index