From 057f7e4aae6588b65278fc26736dbbcb90397137 Mon Sep 17 00:00:00 2001 From: Tim Hutt Date: Sat, 3 Jun 2017 18:42:28 +0100 Subject: [PATCH] Add test case for or on a new line silently being ignored Issue #1886 --- test cases/failing/55 or on new line/meson.build | 13 +++++++++++++ .../failing/55 or on new line/meson_options.txt | 1 + 2 files changed, 14 insertions(+) create mode 100644 test cases/failing/55 or on new line/meson.build create mode 100644 test cases/failing/55 or on new line/meson_options.txt 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 000000000..b7fc89ac1 --- /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 000000000..3302cf4ec --- /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')