Module Name:    src
Committed By:   rillig
Date:           Tue Sep  1 19:17:58 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: opt-m-include-dir.mk

Log Message:
make(1): add test for -m option with special argument .../


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/opt-m-include-dir.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/opt-m-include-dir.mk
diff -u src/usr.bin/make/unit-tests/opt-m-include-dir.mk:1.2 src/usr.bin/make/unit-tests/opt-m-include-dir.mk:1.3
--- src/usr.bin/make/unit-tests/opt-m-include-dir.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/opt-m-include-dir.mk	Tue Sep  1 19:17:58 2020
@@ -1,8 +1,25 @@
-# $NetBSD: opt-m-include-dir.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: opt-m-include-dir.mk,v 1.3 2020/09/01 19:17:58 rillig Exp $
 #
 # Tests for the -m command line option.
 
-# TODO: Implementation
+.MAKEFLAGS: -m .../buf.c
+.MAKEFLAGS: -m .../does-not-exist
+.MAKEFLAGS: -m .../${.PARSEFILE:T}
+
+# Whether or not buf.c exists depends on whether the source code of make
+# is available.  When running the tests in src/usr.bin/make, it succeeds,
+# and when running the tests in src/tests/usr.bin/make, it fails.
+
+# This file should never exist.
+.if exists(does-not-exist)
+.  error
+.endif
+
+# This test assumes that this test is run in the same directory as the
+# test file.
+.if !exists(${.PARSEFILE})
+.  error
+.endif
 
 all:
 	@:;

Reply via email to