aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-01-02 19:14:13 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-01-02 19:14:13 +0200
commitf1bf87ec8a765801b8aec97d64e97b578817430b (patch)
tree32ec12c83addd0d25a66c19e538fcda9fdece947 /test cases
parentea9b49438df496003291287f0028062c195df502 (diff)
downloadmeson-f1bf87ec8a765801b8aec97d64e97b578817430b.zip
meson-f1bf87ec8a765801b8aec97d64e97b578817430b.tar.gz
meson-f1bf87ec8a765801b8aec97d64e97b578817430b.tar.bz2
Added test to check that backslashes are passed properly through the pipeline.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/104 backslash/comparer.c10
-rw-r--r--test cases/common/104 backslash/meson.build3
2 files changed, 13 insertions, 0 deletions
diff --git a/test cases/common/104 backslash/comparer.c b/test cases/common/104 backslash/comparer.c
new file mode 100644
index 0000000..f562f5e
--- /dev/null
+++ b/test cases/common/104 backslash/comparer.c
@@ -0,0 +1,10 @@
+#include<string.h>
+#include<stdio.h>
+
+int main(int argc, char **argv) {
+ if(strcmp(DEF_WITH_BACKSLASH, "foo\\bar")) {
+ printf("Arg string is quoted incorrectly: %s\n", DEF_WITH_BACKSLASH);
+ return 1;
+ }
+ return 0;
+}
diff --git a/test cases/common/104 backslash/meson.build b/test cases/common/104 backslash/meson.build
new file mode 100644
index 0000000..dba891e
--- /dev/null
+++ b/test cases/common/104 backslash/meson.build
@@ -0,0 +1,3 @@
+project('comparer', 'c')
+
+test('backslash quoting', executable('comparer', 'comparer.c', c_args : '-DDEF_WITH_BACKSLASH="foo\\bar"'))