diff options
| author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-10-25 10:46:09 -0400 |
|---|---|---|
| committer | Kyle Edwards <kyle.edwards@kitware.com> | 2022-10-26 12:00:57 -0400 |
| commit | 322193afcdfd3d3ba5a456e5e6f64e3637091736 (patch) | |
| tree | c2a459e20a042d4082610654df370286c7e6c511 /Tests/RunCMake/CMakePresetsWorkflow | |
| parent | 70aef29427b6127fd4c2424ab264de6478117469 (diff) | |
| download | cmake-322193afcdfd3d3ba5a456e5e6f64e3637091736.tar.gz | |
cmake --workflow: print usage and exit on unrecognized argument
Issue: #24073
Diffstat (limited to 'Tests/RunCMake/CMakePresetsWorkflow')
4 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-result.txt b/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-stderr.txt new file mode 100644 index 0000000000..049ff54c8a --- /dev/null +++ b/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-stderr.txt @@ -0,0 +1,6 @@ +^Unknown argument -DINVALID_OPTION +Usage: cmake --workflow \[options\] +Options: + --preset <preset> = Workflow preset to execute\. + --list-presets = List available workflow presets\. + --fresh = Configure a fresh build tree, removing any existing cache file\.$ diff --git a/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-stdout.txt b/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-stdout.txt new file mode 100644 index 0000000000..10f32932ee --- /dev/null +++ b/Tests/RunCMake/CMakePresetsWorkflow/InvalidOption-stdout.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMakePresetsWorkflow/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsWorkflow/RunCMakeTest.cmake index b89a11a6af..c620595af6 100644 --- a/Tests/RunCMake/CMakePresetsWorkflow/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresetsWorkflow/RunCMakeTest.cmake @@ -77,3 +77,4 @@ unset(CMakeUserPresets_FILE) unset(CMakePresets_ASSETS) run_cmake_workflow_presets(ListPresets --list-presets) +run_cmake_workflow_presets(InvalidOption -DINVALID_OPTION) |
