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/e3f61de51eda
branches:  trunk
changeset: 937678:e3f61de51eda
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 009509e47f37 -r e3f61de51eda 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 009509e47f37 -r e3f61de51eda 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 009509e47f37 -r e3f61de51eda 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