jmmv eb66ec28f9 Move old fmake tests into bmake and hook them to the build.
This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs.  Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet.  In the interim, just put them under usr.bin/bmake/
while we sort things out.  The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.
2014-05-14 18:43:13 +00:00

60 lines
621 B
Makefile

# $FreeBSD$
#
# Test handling of escaped newlines.
#
.ifmake test1
# This should succeed
\
\
\
test1:
@echo ok
.elifmake test2
# This should print ok because the second assignment to foo is actually
# a continued comment.
FOO=ok
#\
\
FOO=not ok
test2:
@echo "${FOO}"
.elifmake test3
# Make sure an escaped newline inserts a space
test3: a\
b
a:
@echo a
b:
@echo b
.elifmake test4
# Make sure an escaped newline inserts exactly one space
FOO=a\
b
test4:
@echo "${FOO}"
.elifmake test5
# Make sure each escaped newline inserts exactly one space
FOO=a\
\
\
\
b
test5:
@echo "${FOO}"
.endif