Skip to content

Commit

Permalink
Fix snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospb19 committed Oct 5, 2023
1 parent b9b4550 commit 41cf0f8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 15 deletions.
54 changes: 40 additions & 14 deletions tests/usage-long.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,49 @@
$ cargo-sweep sweep --help
A tool for cleaning unused build files created by Cargo

Usage: cargo-sweep[EXE] sweep [OPTIONS] <--stamp|--file|--time <DAYS>|--installed|--toolchains <TOOLCHAINS>|--maxsize <MAXSIZE_MB>> [PATH]...
Usage: cargo-sweep[EXE] sweep [OPTIONS] <--stamp|--file|--time <DAYS>|--installed|--toolchains <TOOLCHAINS>|--maxsize <MAXSIZE>> [PATH]...

Arguments:
[PATH]... Path to check
[PATH]...
Path to check

Options:
-d, --dry-run Dry run which will not delete any files
-f, --file Load timestamp file in the given path, cleaning everything older
--hidden The `recursive` flag defaults to ignoring directories that start with a `.`, `.git` for example is unlikely to include a Cargo project, this flag changes it to look in them
-i, --installed Keep only artifacts made by Toolchains currently installed by rustup
-m, --maxsize <MAXSIZE_MB> Remove oldest artifacts until the target directory is below the specified size in MB
-r, --recursive Apply on all projects below the given path
-s, --stamp Store timestamp file at the given path, is used by file option
-t, --time <DAYS> Number of days backwards to keep
--toolchains <TOOLCHAINS> Toolchains currently installed by rustup that should have their artifacts kept
-v, --verbose... Enable DEBUG logs (use twice for TRACE logs)
-h, --help Print help
-V, --version Print version
-d, --dry-run
Dry run which will not delete any files

-f, --file
Load timestamp file in the given path, cleaning everything older

--hidden
The `recursive` flag defaults to ignoring directories that start with a `.`, `.git` for example is unlikely to include a Cargo project, this flag changes it to look in them

-i, --installed
Keep only artifacts made by Toolchains currently installed by rustup

-m, --maxsize <MAXSIZE>
Remove oldest artifacts from the target folder until it's smaller than MAXSIZE

Unit defaults to MB, examples: --maxsize 500, --maxsize 10GB

-r, --recursive
Apply on all projects below the given path

-s, --stamp
Store timestamp file at the given path, is used by file option

-t, --time <DAYS>
Number of days backwards to keep

--toolchains <TOOLCHAINS>
Toolchains currently installed by rustup that should have their artifacts kept

-v, --verbose...
Enable DEBUG logs (use twice for TRACE logs)

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

-V, --version
Print version

```
2 changes: 1 addition & 1 deletion tests/usage.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Options:
-t, --time <DAYS> Number of days backwards to keep
--toolchains <TOOLCHAINS> Toolchains currently installed by rustup that should have their artifacts kept
-v, --verbose... Enable DEBUG logs (use twice for TRACE logs)
-h, --help Print help
-h, --help Print help (see more with '--help')
-V, --version Print version

```

0 comments on commit 41cf0f8

Please sign in to comment.