aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/210 line continuation
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2019-01-04 10:09:05 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-05 21:45:37 +0200
commit90c9b868b20b11bb089fc5e0c634d5ed76fea0cb (patch)
treeb94005146c7cd2630c540d60a506d4e06099ee09 /test cases/common/210 line continuation
parent83964f64fa193669ad7543c618568b115c2b212b (diff)
downloadmeson-90c9b868b20b11bb089fc5e0c634d5ed76fea0cb.zip
meson-90c9b868b20b11bb089fc5e0c634d5ed76fea0cb.tar.gz
meson-90c9b868b20b11bb089fc5e0c634d5ed76fea0cb.tar.bz2
parser: Fix line continuation outside of (), [] or {}
The documentation states: "In other cases you can get multi-line statements by ending the line with a \." but that seems to never have worked. Closes: #4720
Diffstat (limited to 'test cases/common/210 line continuation')
-rw-r--r--test cases/common/210 line continuation/meson.build17
1 files changed, 17 insertions, 0 deletions
diff --git a/test cases/common/210 line continuation/meson.build b/test cases/common/210 line continuation/meson.build
new file mode 100644
index 0000000..16c72f9
--- /dev/null
+++ b/test cases/common/210 line continuation/meson.build
@@ -0,0 +1,17 @@
+project('line continuation')
+
+a = 1
+b = 2
+
+c = a \
++b
+assert(c == 3, 'Line continuation is not working')
+
+d = a + \
+ b
+assert(d == 3, 'Line continuation is not working')
+
+if a == 1 and \
+ b == 3
+ error('Line continuation in "if" condition is not working')
+endif