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 the command li...
details: https://anonhg.NetBSD.org/src/rev/49ad3fbcc043
branches: trunk
changeset: 957012:49ad3fbcc043
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Nov 14 13:59:58 2020 +0000
description:
make(1): add test for the command line option -t
diffstat:
usr.bin/make/unit-tests/opt-touch.exp | 2 ++
usr.bin/make/unit-tests/opt-touch.mk | 18 ++++++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 7760b43a0517 -r 49ad3fbcc043 usr.bin/make/unit-tests/opt-touch.exp
--- a/usr.bin/make/unit-tests/opt-touch.exp Sat Nov 14 13:45:34 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-touch.exp Sat Nov 14 13:59:58 2020 +0000
@@ -1,1 +1,3 @@
+`opt-touch-join' is up to date.
+`opt-touch-use' is up to date.
exit status 0
diff -r 7760b43a0517 -r 49ad3fbcc043 usr.bin/make/unit-tests/opt-touch.mk
--- a/usr.bin/make/unit-tests/opt-touch.mk Sat Nov 14 13:45:34 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-touch.mk Sat Nov 14 13:59:58 2020 +0000
@@ -1,8 +1,18 @@
-# $NetBSD: opt-touch.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: opt-touch.mk,v 1.3 2020/11/14 13:59:58 rillig Exp $
#
# Tests for the -t command line option.
-# TODO: Implementation
+.MAKEFLAGS: -t opt-touch-phony opt-touch-join opt-touch-use
+
+opt-touch-phony: .PHONY
+ : Making $@.
-all:
- @:;
+opt-touch-join: .JOIN
+ : Making $@.
+
+opt-touch-use: .USE
+ : Making use of $@.
+
+.END:
+ @files=$$(ls opt-touch-* 2>/dev/null | grep -v -e '\.' -e '\*'); \
+ [ -z "$$files" ] || { echo "created files: $$files" 1>&2; exit 1; }
Home |
Main Index |
Thread Index |
Old Index