diff options
Diffstat (limited to 'unit-tests/directive-include.mk')
-rwxr-xr-x | unit-tests/directive-include.mk | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/unit-tests/directive-include.mk b/unit-tests/directive-include.mk new file mode 100755 index 0000000000000..d71b27ef2c630 --- /dev/null +++ b/unit-tests/directive-include.mk @@ -0,0 +1,26 @@ +# $NetBSD: directive-include.mk,v 1.3 2020/10/31 23:01:23 rillig Exp $ +# +# Tests for the .include directive, which includes another file. + +# TODO: Implementation + +.MAKEFLAGS: -dc + +# All included files are recorded in the variable .MAKE.MAKEFILES. +# In this test, only the basenames of the files are compared since +# the directories can differ. +.include "/dev/null" +.if ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null" +. error +.endif + +# Each file is recorded only once in the variable .MAKE.MAKEFILES. +# Between 2015-11-26 and 2020-10-31, the very last file could be repeated, +# due to an off-by-one bug in ParseTrackInput. +.include "/dev/null" +.if ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null" +. error +.endif + +all: + @:; |