Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure for 1.1.0 #113

Closed
orhun opened this issue May 22, 2023 · 0 comments · Fixed by #114
Closed

Test failure for 1.1.0 #113

orhun opened this issue May 22, 2023 · 0 comments · Fixed by #114

Comments

@orhun
Copy link

orhun commented May 22, 2023

Hey, AUR maintainer of argc here 👋🏼

I'm getting the following test failure while trying to build the latest version:

Logs
running 10 tests
test compgen::tests::test_get_last_word ... ok
test parser::tests::test_parse_no_long_flag_arg ... ok
test parser::tests::test_parse_no_long_option_arg ... ok
test parser::tests::test_parse_line ... ok
test utils::tests::test_cobol ... ok
test parser::tests::test_parse_with_long_flag_arg ... ok
test parser::tests::test_parse_with_long_flag_arg_single_dash ... ok
test parser::tests::test_parse_positional_arg ... ok
test parser::tests::test_parse_with_long_option_arg ... ok
test parser::tests::test_parse_with_long_option_arg_single_dash ... ok

test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/bin/argc/main.rs (target/debug/deps/argc-05cd09e0693dbda7)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/tests.rs (target/debug/deps/integration-343b0242d08b2e78)

running 79 tests
test cli::help ... ok
test cli::version ... ok
test argcfile::argcfile_path ... ok
test fail::arg_miss_default_fn ... ok
test fail::cmd_miss_fn ... ok
test fail::arg_miss_choice_fn ... ok
test fail::conflict_alias ... ok
test fail::conflict_short_flag ... ok
test fail::conflict_cmd ... ok
test fail::conflict_long_flag ... ok
test fail::conflict_positional ... ok
test fail::conflict_long_option ... ok
test fail::conflict_short_option ... ok
test fail::option_miss_choice_fn ... ok
test fail::unsupported_tag ... ok
test fail::option_miss_default_fn ... ok
test fail::unexpected_arg ... ok
test cli::compgen ... ok
test create::create ... ok
test create::create_with_tasks ... ok
test argcfile::argcfile ... ok
test compgen::nested_subcmds ... ok
test compgen::subcmds ... ok
test main_fn::nested_subcmd_no_main ... ok
test main_fn::subcmd_no_main ... ok
test export::case1 ... ok
test spec::undefine_positionals ... ok
test misc::escape ... ok
test param_fn::case1 ... ok
test main_fn::nested_subcmd_main ... ok
test validate::arg_choice ... ok
test validate::arg_choice_fn_pass ... ok
test compgen::multiple ... ok
test spec::arg_no_param ... ok
test validate::arg_missing ... ok
test validate::arg_help_subcmd ... ok
test validate::arg_unknown ... ok
test spec::arg_no_option ... ok
test main_fn::no_main ... ok
test spec::option_help ... ok
test validate::arg_choice_fn_skip ... ok
test validate::option_choice_fn_pass ... ok
test validate::flag_not_multiple ... ok
test param_fn::case3 ... ok
test spec::option_shorts ... ok
test spec::same_option_positional ... ok
test compgen::shorts ... ok
test validate::option_not_multiple ... ok
test validate::option_mismatch_values ... ok
test main_fn::with_main ... ok
test validate::param_missing ... ok
test validate::flag_with_value ... ok
test validate::option_choice ... ok
test param_fn::case2 ... ok
test validate::help_version_shadow ... ok
test compgen::positionals ... ok
test spec::arg_two_multi ... ok
test wrap_help::wrap ... ok
test validate::option_missing ... ok
test validate::option_unknown ... ok
test validate::param_missing_parent ... ok
test validate::option_choice_fn_skip ... ok
test validate::empty_choices ... ok
test spec::dashdash_split ... ok
test main_fn::subcmd_main ... ok
test wrap_help::wrap2 ... ok
test wrap_help::nowrap ... ok
test validate::arg_invalid_subcmd ... ok
test validate::help_version ... ok
test spec::arg_subcmd_help ... ok
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__compgen__choice.snap.new
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__validate__arg_choice_fn.snap.new
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__validate__arg_choice_multi.snap.new
test validate::arg_choice_fn ... FAILED
test compgen::choice ... FAILED
test validate::arg_choice_multi ... FAILED
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__validate__option_choice_fn.snap.new
test validate::option_choice_fn ... FAILED
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__spec__option_eval.snap.new
test spec::option_eval ... FAILED
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__validate__choice_access_vars.snap.new
test validate::choice_access_vars ... FAILED
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__validate__option_choice_multi.snap.new
stored new snapshot /build/argc/src/argc-1.1.0/tests/snapshots/integration__spec__arg_eval.snap.new
test validate::option_choice_multi ... FAILED
test spec::arg_eval ... FAILED
test interrupt::interrupt ... ok

failures:

---- validate::arg_choice_fn stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__validate__arg_choice_fn.snap
Snapshot: arg_choice_fn
Source: tests/validate.rs:64
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    2     2 │
    3     3 │ OUTPUT
    4     4 │ cat >&2 <<-'EOF'
    5     5 │ error: invalid value 'val' for '[VAL]'
    6       │-  [possible values: abc, def, ghi]
          6 │+  [possible values: ]
    7     7 │
    8     8 │ For more information, try '--help'.
    9     9 │
   10    10 │ EOF
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'validate::arg_choice_fn' panicked at 'snapshot assertion for 'arg_choice_fn' failed in line 64', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9

---- compgen::choice stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__compgen__choice.snap
Snapshot: choice
Source: tests/compgen.rs:164
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    0     0 │ ************ COMPGEN `prog  --oa ` ************
    1       │-abc
    2       │-def
    3       │-ghi
    4     1 │
          2 │+
    5     3 │ ************ COMPGEN `prog  --ob ` ************
    6     4 │ x
    7     5 │ y
    8     6 │ z
┈┈┈┈┈┈┈┈┈┈┈┈┼┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
   16    14 │
   17    15 │ ************ COMPGEN `prog  v1 ` ************
   18    16 │ --oa
   19    17 │ --ob
   20       │-abc
   21       │-def
   22       │-ghi
   23    18 │
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'compgen::choice' panicked at 'snapshot assertion for 'choice' failed in line 164', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- validate::arg_choice_multi stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__validate__arg_choice_multi.snap
Snapshot: arg_choice_multi
Source: tests/validate.rs:87
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    1     1 │ prog cmdl abc val
    2     2 │
    3     3 │ OUTPUT
    4     4 │ cat >&2 <<-'EOF'
    5       │-error: invalid value 'val' for '[VAL]...'
    6       │-  [possible values: abc, def, ghi]
          5 │+error: invalid value 'abc' for '[VAL]...'
          6 │+  [possible values: ]
    7     7 │
    8     8 │ For more information, try '--help'.
    9     9 │
   10    10 │ EOF
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'validate::arg_choice_multi' panicked at 'snapshot assertion for 'arg_choice_multi' failed in line 87', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9

---- validate::option_choice_fn stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__validate__option_choice_fn.snap
Snapshot: option_choice_fn
Source: tests/validate.rs:131
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    2     2 │
    3     3 │ OUTPUT
    4     4 │ cat >&2 <<-'EOF'
    5     5 │ error: invalid value 'val' for '<CC>'
    6       │-  [possible values: abc, def, ghi]
          6 │+  [possible values: ]
    7     7 │
    8     8 │ For more information, try '--help'.
    9     9 │
   10    10 │ EOF
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'validate::option_choice_fn' panicked at 'snapshot assertion for 'option_choice_fn' failed in line 131', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9

---- spec::option_eval stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__spec__option_eval.snap
Snapshot: option_eval
Source: tests/spec.rs:21
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
   71    71 │ ************ RUN ************
   72    72 │ prog cmda --cc abc
   73    73 │
   74    74 │ OUTPUT
   75       │-argc_cc=abc
   76       │-argc__args=(  )
   77       │-argc__fn=cmda
   78       │-cmda
         75 │+cat >&2 <<-'EOF'
         76 │+error: invalid value 'abc' for '<CC>'
         77 │+  [possible values: ]
         78 │+
         79 │+For more information, try '--help'.
         80 │+
         81 │+EOF
         82 │+exit 1
   79    83 │
   80    84 │ ************ RUN ************
   81    85 │ prog cmda -soa soa
   82    86 │
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'spec::option_eval' panicked at 'snapshot assertion for 'option_eval' failed in line 21', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9

---- validate::choice_access_vars stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__validate__choice_access_vars.snap
Snapshot: choice_access_vars
Source: tests/validate.rs:209
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    2     2 │
    3     3 │ OUTPUT
    4     4 │ cat >&2 <<-'EOF'
    5     5 │ error: invalid value 'foo' for '[VAL]'
    6       │-  [possible values: abc]
          6 │+  [possible values: ]
    7     7 │
    8     8 │ For more information, try '--help'.
    9     9 │
   10    10 │ EOF
┈┈┈┈┈┈┈┈┈┈┈┈┼┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
   15    15 │
   16    16 │ OUTPUT
   17    17 │ cat >&2 <<-'EOF'
   18    18 │ error: invalid value 'foo' for '[VAL]'
   19       │-  [possible values: def]
         19 │+  [possible values: ]
   20    20 │
   21    21 │ For more information, try '--help'.
   22    22 │
   23    23 │ EOF
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'validate::choice_access_vars' panicked at 'snapshot assertion for 'choice_access_vars' failed in line 209', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9

---- validate::option_choice_multi stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__validate__option_choice_multi.snap
Snapshot: option_choice_multi
Source: tests/validate.rs:154
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    1     1 │ prog cmda --ce abc val
    2     2 │
    3     3 │ OUTPUT
    4     4 │ cat >&2 <<-'EOF'
    5       │-error: invalid value 'val' for '<CE>'
    6       │-  [possible values: abc, def, ghi]
          5 │+error: invalid value 'abc' for '<CE>'
          6 │+  [possible values: ]
    7     7 │
    8     8 │ For more information, try '--help'.
    9     9 │
   10    10 │ EOF
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'validate::option_choice_multi' panicked at 'snapshot assertion for 'option_choice_multi' failed in line 154', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9

---- spec::arg_eval stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/integration__spec__arg_eval.snap
Snapshot: arg_eval
Source: tests/spec.rs:58
────────────────────────────────────────────────────────────────────────────────
Expression: data
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
   54    54 │ ************ RUN ************
   55    55 │ prog cmdj abc
   56    56 │
   57    57 │ OUTPUT
   58       │-argc_val=abc
   59       │-argc__args=( abc )
   60       │-argc__fn=cmdj
   61       │-cmdj abc
         58 │+cat >&2 <<-'EOF'
         59 │+error: invalid value 'abc' for '[VAL]'
         60 │+  [possible values: ]
         61 │+
         62 │+For more information, try '--help'.
         63 │+
         64 │+EOF
         65 │+exit 1
   62    66 │
   63    67 │ ************ RUN ************
   64    68 │ prog cmdp v1 v2
   65    69 │
────────────┴───────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'spec::arg_eval' panicked at 'snapshot assertion for 'arg_eval' failed in line 58', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/insta-1.29.0/src/runtime.rs:569:9


failures:
    compgen::choice
    spec::arg_eval
    spec::option_eval
    validate::arg_choice_fn
    validate::arg_choice_multi
    validate::choice_access_vars
    validate::option_choice_fn
    validate::option_choice_multi

test result: FAILED. 71 passed; 8 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.02s

error: test failed, to rerun pass `--test integration`

I'm wondering if there is a setup procedure for test or maybe a recommended way to run them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant