aboutsummaryrefslogtreecommitdiff
path: root/tests/escaping
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-09 16:20:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-09 16:20:41 +0200
commit1e61471d480575d069f96b858e4b46f43ba0530f (patch)
tree9a73101d555a2212fa68a36626fb850496da8e03 /tests/escaping
parentea66709a853255c7957a8a7907fd21fa7f6cfd3f (diff)
For newline escaping, ignore whole thing instead of making it newline
To capture literal newline, use quoting.
Diffstat (limited to 'tests/escaping')
-rw-r--r--tests/escaping/buildfile13
-rw-r--r--tests/escaping/test.out4
-rwxr-xr-xtests/escaping/test.sh3
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/escaping/buildfile b/tests/escaping/buildfile
new file mode 100644
index 0000000..4259087
--- /dev/null
+++ b/tests/escaping/buildfile
@@ -0,0 +1,13 @@
+print \'single\'
+print \"double\"
+
+# Newline is special.
+#
+\
+print foo\
+bar
+
+print foo \
+bar
+
+./:
diff --git a/tests/escaping/test.out b/tests/escaping/test.out
new file mode 100644
index 0000000..9894dde
--- /dev/null
+++ b/tests/escaping/test.out
@@ -0,0 +1,4 @@
+'single'
+"double"
+foobar
+foo bar
diff --git a/tests/escaping/test.sh b/tests/escaping/test.sh
new file mode 100755
index 0000000..b898b3c
--- /dev/null
+++ b/tests/escaping/test.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+valgrind -q b -q | diff -u test.out -