From 9fc7faa57a3595c391f161ccb61f87c2f432a81c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 3 Feb 2021 09:10:31 -0800 Subject: [PATCH] update new error messages Signed-off-by: Rudi Grinberg --- .../test-cases/cmdliner-dep-conf.t/run.t | 4 ++-- test/blackbox-tests/test-cases/describe.t/run.t | 8 ++++---- .../blackbox-tests/test-cases/dune-init.t/run.t | 13 +++++++------ .../test-cases/github3046.t/run.t | 17 +++++++++-------- .../test-cases/github3530.t/run.t | 4 ++-- test/blackbox-tests/test-cases/misc.t/run.t | 12 ++++++------ 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/test/blackbox-tests/test-cases/cmdliner-dep-conf.t/run.t b/test/blackbox-tests/test-cases/cmdliner-dep-conf.t/run.t index 4d30197b470e..6d3706ccef60 100755 --- a/test/blackbox-tests/test-cases/cmdliner-dep-conf.t/run.t +++ b/test/blackbox-tests/test-cases/cmdliner-dep-conf.t/run.t @@ -14,13 +14,13 @@ [1] $ dune build "(fi" - dune: TARGET... arguments: unclosed parenthesis at end of input + dune build: TARGET... arguments: unclosed parenthesis at end of input Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] $ dune build "()" - dune: TARGET... arguments: Unexpected list + dune build: TARGET... arguments: Unexpected list Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] diff --git a/test/blackbox-tests/test-cases/describe.t/run.t b/test/blackbox-tests/test-cases/describe.t/run.t index bce21e924227..9e54ab6fece7 100644 --- a/test/blackbox-tests/test-cases/describe.t/run.t +++ b/test/blackbox-tests/test-cases/describe.t/run.t @@ -94,10 +94,10 @@ Test errors [1] $ dune describe --lang 1.0 - dune: Only --lang 0.1 is available at the moment as this command is not yet - stabilised. If you would like to release a software that relies on the output - of 'dune describe', please open a ticket on - https://github.com/ocaml/dune. + dune describe: Only --lang 0.1 is available at the moment as this command is not yet + stabilised. If you would like to release a software that relies on the output + of 'dune describe', please open a ticket on + https://github.com/ocaml/dune. Usage: dune describe [OPTION]... [STRING]... Try `dune describe --help' or `dune --help' for more information. [1] diff --git a/test/blackbox-tests/test-cases/dune-init.t/run.t b/test/blackbox-tests/test-cases/dune-init.t/run.t index c240b3800002..ae5bf71cbf63 100644 --- a/test/blackbox-tests/test-cases/dune-init.t/run.t +++ b/test/blackbox-tests/test-cases/dune-init.t/run.t @@ -239,10 +239,11 @@ Comments in dune files are preserved Will not create components with invalid names $ dune init lib invalid-component-name ./_test_lib - dune: NAME argument: invalid component name `invalid-component-name' - Library names must be non-empty and composed only of the - following - characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'. + dune init: NAME argument: invalid component name + `invalid-component-name' + Library names must be non-empty and composed only of the + following + characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'. Usage: dune init [OPTION]... INIT_KIND NAME [PATH] Try `dune init --help' or `dune --help' for more information. [1] @@ -252,8 +253,8 @@ Will not create components with invalid names Will fail and inform user when invalid component command is given $ dune init foo blah - dune: INIT_KIND argument: invalid value `foo', expected one of `executable', - `library', `project' or `test' + dune init: INIT_KIND argument: invalid value `foo', expected one of + `executable', `library', `project' or `test' Usage: dune init [OPTION]... INIT_KIND NAME [PATH] Try `dune init --help' or `dune --help' for more information. [1] diff --git a/test/blackbox-tests/test-cases/github3046.t/run.t b/test/blackbox-tests/test-cases/github3046.t/run.t index 4986ae1ef84a..19add0b4f081 100644 --- a/test/blackbox-tests/test-cases/github3046.t/run.t +++ b/test/blackbox-tests/test-cases/github3046.t/run.t @@ -7,8 +7,8 @@ are given as parameters `dune init exe main --libs="str gsl"` returns an informative parsing error $ dune init exe main --libs="str gsl" - dune: option `--libs': invalid element in list (`str gsl'): expected a valid - dune atom + dune init: option `--libs': invalid element in list (`str gsl'): expected a + valid dune atom Usage: dune init [OPTION]... INIT_KIND NAME [PATH] Try `dune init --help' or `dune --help' for more information. [1] @@ -16,8 +16,8 @@ are given as parameters `dune init lib foo --ppx="foo bar"` returns an informative parsing error $ dune init lib foo --ppx="foo bar" - dune: option `--ppx': invalid element in list (`foo bar'): expected a valid - dune atom + dune init: option `--ppx': invalid element in list (`foo bar'): expected a + valid dune atom Usage: dune init [OPTION]... INIT_KIND NAME [PATH] Try `dune init --help' or `dune --help' for more information. [1] @@ -25,10 +25,11 @@ are given as parameters `dune init lib foo --public="some/invalid&name!"` returns an informative parsing error $ dune init lib foo --public="some/invalid&name!" - dune: option `--public': invalid component name `some/invalid&name!' - Library names must be non-empty and composed only of the - following - characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'. + dune init: option `--public': invalid component name + `some/invalid&name!' + Library names must be non-empty and composed only of the + following + characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'. Usage: dune init [OPTION]... INIT_KIND NAME [PATH] Try `dune init --help' or `dune --help' for more information. [1] diff --git a/test/blackbox-tests/test-cases/github3530.t/run.t b/test/blackbox-tests/test-cases/github3530.t/run.t index 68f8b6295b3c..3c96d014d074 100644 --- a/test/blackbox-tests/test-cases/github3530.t/run.t +++ b/test/blackbox-tests/test-cases/github3530.t/run.t @@ -2,7 +2,7 @@ When an empty string is passed to `-p`, we get a nice error message. $ echo '(lang dune 2.0)' > dune-project $ dune build -p '' - dune: option `-p': Invalid package name: "" + dune build: option `-p': Invalid package name: "" Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] @@ -10,7 +10,7 @@ When an empty string is passed to `-p`, we get a nice error message. This can happen in a list as well: $ dune build -p 'a,b,' - dune: option `-p': Invalid package name: "" + dune build: option `-p': Invalid package name: "" Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] diff --git a/test/blackbox-tests/test-cases/misc.t/run.t b/test/blackbox-tests/test-cases/misc.t/run.t index c2e220632f73..eb6c2bdd7dda 100644 --- a/test/blackbox-tests/test-cases/misc.t/run.t +++ b/test/blackbox-tests/test-cases/misc.t/run.t @@ -6,37 +6,37 @@ Test that incompatible options are properly reported ---------------------------------------------------- $ dune build --verbose --display quiet - dune: Cannot use --verbose and --display simultaneously + dune build: Cannot use --verbose and --display simultaneously Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] $ dune build -p toto --root . - dune: Cannot use --root and -p simultaneously + dune build: Cannot use --root and -p simultaneously Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] $ dune build --for-release-of-packages toto --root . - dune: Cannot use --root and --for-release-of-packages simultaneously + dune build: Cannot use --root and --for-release-of-packages simultaneously Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] $ dune build --no-config --config x - dune: Cannot use --config and --no-config simultaneously + dune build: Cannot use --config and --no-config simultaneously Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] $ dune build -p toto --release - dune: Cannot use --release and -p simultaneously + dune build: Cannot use --release and -p simultaneously Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1] $ dune build --release --root . - dune: Cannot use --root and --release simultaneously + dune build: Cannot use --root and --release simultaneously Usage: dune build [OPTION]... [TARGET]... Try `dune build --help' or `dune --help' for more information. [1]