summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/posix.mk
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/unit-tests/posix.mk')
-rw-r--r--usr.bin/make/unit-tests/posix.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/usr.bin/make/unit-tests/posix.mk b/usr.bin/make/unit-tests/posix.mk
new file mode 100644
index 0000000..a73e2e5
--- /dev/null
+++ b/usr.bin/make/unit-tests/posix.mk
@@ -0,0 +1,24 @@
+# $Id: posix.mk,v 1.1 2014/08/21 13:44:51 apb Exp $
+
+all: x plus subs err
+
+x:
+ @echo "Posix says we should execute the command as if run by system(3)"
+ @echo "Expect 'Hello,' and 'World!'"
+ @echo Hello,; false; echo "World!"
+
+plus:
+ @echo a command
+ +@echo "a command prefixed by '+' executes even with -n"
+ @echo another command
+
+subs:
+ @echo make -n
+ @${.MAKE} -f ${MAKEFILE} -n plus
+ @echo make -n -j1
+ @${.MAKE} -f ${MAKEFILE} -n -j1 plus
+
+err:
+ @(echo Now we expect an error...; exit 1)
+ @echo "Oops! you shouldn't see this!"
+