Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed Sep 1, 2024
1 parent 2fa2852 commit 687662c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/cli/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ mod tests {
gitignore: false,
format: None,
// This is usually replaced in assertion tests
password: None,
cmd: Subcommand::Decompress {
// Put a crazy value here so no test can assert it unintentionally
files: vec!["\x00\x11\x22".into()],
Expand Down
21 changes: 11 additions & 10 deletions tests/snapshots/ui__ui_test_usage_help_flag-2.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: tests/ui.rs
assertion_line: 119
expression: "output_to_string(ouch!(\"-h\"))"
---
A command-line utility for easily compressing and decompressing files and directories.
Expand All @@ -13,13 +14,13 @@ Commands:
help Print this message or the help of the given subcommand(s)

Options:
-y, --yes Skip [Y/n] questions positively
-n, --no Skip [Y/n] questions negatively
-A, --accessible Activate accessibility mode, reducing visual noise [env: ACCESSIBLE=]
-H, --hidden Ignores hidden files
-q, --quiet Silences output
-g, --gitignore Ignores files matched by git's ignore files
-f, --format <FORMAT> Specify the format of the archive
-h, --help Print help (see more with '--help')
-V, --version Print version

-y, --yes Skip [Y/n] questions positively
-n, --no Skip [Y/n] questions negatively
-A, --accessible Activate accessibility mode, reducing visual noise [env: ACCESSIBLE=]
-H, --hidden Ignores hidden files
-q, --quiet Silences output
-g, --gitignore Ignores files matched by git's ignore files
-f, --format <FORMAT> Specify the format of the archive
-p, --password <PASSWORD> decompress or list with password
-h, --help Print help (see more with '--help')
-V, --version Print version
3 changes: 3 additions & 0 deletions tests/snapshots/ui__ui_test_usage_help_flag.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ Options:
-f, --format <FORMAT>
Specify the format of the archive

-p, --password <PASSWORD>
decompress or list with password

-h, --help
Print help (see a summary with '-h')

Expand Down

0 comments on commit 687662c

Please sign in to comment.