aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hutt <tdhutt@gmail.com>2017-06-03 18:42:28 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2017-06-25 21:30:30 +0300
commit057f7e4aae6588b65278fc26736dbbcb90397137 (patch)
treef2baf32ade47535aecc4558888c3181e40230a90
parent1821598fbb856edc3cf87470171e85e8910a6f99 (diff)
downloadmeson-057f7e4aae6588b65278fc26736dbbcb90397137.zip
meson-057f7e4aae6588b65278fc26736dbbcb90397137.tar.gz
meson-057f7e4aae6588b65278fc26736dbbcb90397137.tar.bz2
Add test case for or on a new line silently being ignored
Issue #1886
-rw-r--r--test cases/failing/55 or on new line/meson.build13
-rw-r--r--test cases/failing/55 or on new line/meson_options.txt1
2 files changed, 14 insertions, 0 deletions
diff --git a/test cases/failing/55 or on new line/meson.build b/test cases/failing/55 or on new line/meson.build
new file mode 100644
index 0000000..b7fc89a
--- /dev/null
+++ b/test cases/failing/55 or on new line/meson.build
@@ -0,0 +1,13 @@
+project('silent_or', 'c')
+
+if get_option('foo') == 'true' or get_option('foo') == 'auto'
+
+else
+ error('This case is fine - this error isn't triggered.')
+endif
+
+if get_option('foo') == 'true'
+ or get_option('foo') == 'auto'
+else
+ error('This error is triggered because the or statement is silently ignored.')
+endif
diff --git a/test cases/failing/55 or on new line/meson_options.txt b/test cases/failing/55 or on new line/meson_options.txt
new file mode 100644
index 0000000..3302cf4
--- /dev/null
+++ b/test cases/failing/55 or on new line/meson_options.txt
@@ -0,0 +1 @@
+option('foo', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')