From 41cf0f810b54a0b4a5c2e3592540a706abc1492a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20P=2E=20Bezerra?= Date: Thu, 5 Oct 2023 14:07:58 -0300 Subject: [PATCH] Fix snapshot tests --- tests/usage-long.trycmd | 54 ++++++++++++++++++++++++++++++----------- tests/usage.trycmd | 2 +- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/tests/usage-long.trycmd b/tests/usage-long.trycmd index 13dc19c..ff2c8e3 100644 --- a/tests/usage-long.trycmd +++ b/tests/usage-long.trycmd @@ -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 |--installed|--toolchains |--maxsize > [PATH]... +Usage: cargo-sweep[EXE] sweep [OPTIONS] <--stamp|--file|--time |--installed|--toolchains |--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 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 Number of days backwards to keep - --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 + 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 + Number of days backwards to keep + + --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 ``` diff --git a/tests/usage.trycmd b/tests/usage.trycmd index 7401471..3571a94 100644 --- a/tests/usage.trycmd +++ b/tests/usage.trycmd @@ -18,7 +18,7 @@ Options: -t, --time Number of days backwards to keep --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 ```