aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-11-16 18:15:09 -0800
committerDylan Baker <dylan@pnwbakers.com>2017-12-19 10:10:40 -0800
commite245e578656f1b3876d22cae6253b58872b10463 (patch)
treee6ca59e45f343b44368a2acb0c4ce06a5e8d6f8b /test cases
parente1c9d2f53a1fb021e266e189e615919cb74569e2 (diff)
downloadmeson-e245e578656f1b3876d22cae6253b58872b10463.zip
meson-e245e578656f1b3876d22cae6253b58872b10463.tar.gz
meson-e245e578656f1b3876d22cae6253b58872b10463.tar.bz2
Warn on unknown command line arguments
I have a tendency to typo things. Humans in general are bad at spotting spelling mistakes, computers are not. This patches prints the bad options and provides the generic meson "This will be a hard error someday" message.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/19 bad command line options/meson.build17
-rw-r--r--test cases/unit/19 bad command line options/meson_options.txt16
-rw-r--r--test cases/unit/19 bad command line options/subprojects/one/meson.build15
-rw-r--r--test cases/unit/19 bad command line options/subprojects/one/meson_options.txt15
4 files changed, 63 insertions, 0 deletions
diff --git a/test cases/unit/19 bad command line options/meson.build b/test cases/unit/19 bad command line options/meson.build
new file mode 100644
index 0000000..b1670c0
--- /dev/null
+++ b/test cases/unit/19 bad command line options/meson.build
@@ -0,0 +1,17 @@
+# Copyright © 2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+project('Bad command line options')
+
+one = subproject('one')
diff --git a/test cases/unit/19 bad command line options/meson_options.txt b/test cases/unit/19 bad command line options/meson_options.txt
new file mode 100644
index 0000000..fc09712
--- /dev/null
+++ b/test cases/unit/19 bad command line options/meson_options.txt
@@ -0,0 +1,16 @@
+# Copyright © 2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+option('opt', type : 'string', description : 'An argument')
+option('good', type : 'boolean', value : true, description : 'another argument')
diff --git a/test cases/unit/19 bad command line options/subprojects/one/meson.build b/test cases/unit/19 bad command line options/subprojects/one/meson.build
new file mode 100644
index 0000000..39ae07e
--- /dev/null
+++ b/test cases/unit/19 bad command line options/subprojects/one/meson.build
@@ -0,0 +1,15 @@
+# Copyright © 2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+project('one subproject')
diff --git a/test cases/unit/19 bad command line options/subprojects/one/meson_options.txt b/test cases/unit/19 bad command line options/subprojects/one/meson_options.txt
new file mode 100644
index 0000000..7d90fae
--- /dev/null
+++ b/test cases/unit/19 bad command line options/subprojects/one/meson_options.txt
@@ -0,0 +1,15 @@
+# Copyright © 2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+option('one', type : 'string', description : 'an option')