summaryrefslogtreecommitdiffstats
path: root/build/pymake/tests/newlines.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build/pymake/tests/newlines.mk')
-rw-r--r--build/pymake/tests/newlines.mk30
1 files changed, 30 insertions, 0 deletions
diff --git a/build/pymake/tests/newlines.mk b/build/pymake/tests/newlines.mk
new file mode 100644
index 000000000..5d8195c94
--- /dev/null
+++ b/build/pymake/tests/newlines.mk
@@ -0,0 +1,30 @@
+#T gmake skip
+
+# Test that we handle \\\n properly
+
+all: dep1 dep2 dep3
+ cat testfile
+ test `cat testfile` = "data";
+ test "$$(cat results)" = "$(EXPECTED)";
+ @echo TEST-PASS
+
+# Test that something that still needs to go to the shell works
+testfile:
+ printf "data" \
+ >>$@
+
+dep1: testfile
+
+# Test that something that does not need to go to the shell works
+dep2:
+ $(echo foo) \
+ $(echo bar)
+
+export EXPECTED := some data
+
+CMD = %pycmd writeenvtofile
+PYCOMMANDPATH = $(TESTPATH)
+
+dep3:
+ $(CMD) \
+ results EXPECTED