mirror of
https://github.com/uutils/coreutils
synced 2024-11-10 07:04:16 +00:00
Merge pull request #6187 from jadijadi/cksum-base64-short-option
cksum: adding -b as the short form of --base64
This commit is contained in:
commit
082528d6de
2 changed files with 10 additions and 7 deletions
|
@ -448,6 +448,7 @@ pub fn uu_app() -> Command {
|
|||
.arg(
|
||||
Arg::new(options::BASE64)
|
||||
.long(options::BASE64)
|
||||
.short('b')
|
||||
.help("emit a base64 digest, not hexadecimal")
|
||||
.action(ArgAction::SetTrue)
|
||||
// Even though this could easily just override an earlier '--raw',
|
||||
|
|
|
@ -379,13 +379,15 @@ fn test_base64_raw_conflicts() {
|
|||
#[test]
|
||||
fn test_base64_single_file() {
|
||||
for algo in ALGOS {
|
||||
new_ucmd!()
|
||||
.arg("--base64")
|
||||
.arg("lorem_ipsum.txt")
|
||||
.arg(format!("--algorithm={algo}"))
|
||||
.succeeds()
|
||||
.no_stderr()
|
||||
.stdout_is_fixture_bytes(format!("base64/{algo}_single_file.expected"));
|
||||
for base64_option in ["--base64", "-b"] {
|
||||
new_ucmd!()
|
||||
.arg(base64_option)
|
||||
.arg("lorem_ipsum.txt")
|
||||
.arg(format!("--algorithm={algo}"))
|
||||
.succeeds()
|
||||
.no_stderr()
|
||||
.stdout_is_fixture_bytes(format!("base64/{algo}_single_file.expected"));
|
||||
}
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue