-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
these tests are used to assert on Ouch's output for error reports and progress logging
- Loading branch information
1 parent
e1a1af9
commit dc25ede
Showing
14 changed files
with
394 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tests/snapshots/ui__ui_test_err_compress_missing_extension.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch compress input output\", dir)" | ||
--- | ||
[ERROR] Cannot compress to 'output'. | ||
- You shall supply the compression format | ||
|
||
hint: Try adding supported extensions (see --help): | ||
hint: ouch compress <FILES>... output.tar.gz | ||
hint: ouch compress <FILES>... output.zip | ||
hint: | ||
hint: Alternatively, you can overwrite this option by using the '--format' flag: | ||
hint: ouch compress <FILES>... output --format tar.gz | ||
|
14 changes: 14 additions & 0 deletions
14
tests/snapshots/ui__ui_test_err_decompress_missing_extension.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch decompress a\", dir)" | ||
--- | ||
[ERROR] Cannot decompress files without extensions | ||
- Files without supported extensions: <FOLDER>/a | ||
- Decompression formats are detected automatically by the file extension | ||
|
||
hint: Provide a file with a supported extension: | ||
hint: ouch decompress example.tar.gz | ||
hint: | ||
hint: Or overwrite this option with the '--format' flag: | ||
hint: ouch decompress <FOLDER>/a --format tar.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch decompress a b\", dir)" | ||
--- | ||
[ERROR] failed to canonicalize path `a` | ||
- File not found | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch list a b\", dir)" | ||
--- | ||
[ERROR] failed to canonicalize path `a` | ||
- File not found | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch compress a b\", dir)" | ||
--- | ||
[ERROR] failed to canonicalize path `a` | ||
- File not found | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch compress input output.gz\", dir)" | ||
--- | ||
[INFO] Successfully compressed 'output.gz'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch compress input output.zip\", dir)" | ||
--- | ||
[INFO] Compressing 'input'. | ||
[INFO] Successfully compressed 'output.zip'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch decompress output.zst\", dir)" | ||
--- | ||
[INFO] Failed to confirm the format of `output` by sniffing the contents, file might be misnamed | ||
[INFO] Successfully decompressed archive in current directory. | ||
[INFO] Files unpacked: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "output_to_string(ouch!(\"-h\"))" | ||
--- | ||
A command-line utility for easily compressing and decompressing files and directories. | ||
|
||
Usage: ouch [OPTIONS] <COMMAND> | ||
|
||
Commands: | ||
compress Compress one or more files into one output file [aliases: c] | ||
decompress Decompresses one or more files, optionally into another folder [aliases: d] | ||
list List contents of an archive [aliases: l, ls] | ||
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 | ||
|
Oops, something went wrong.