1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

base32/64: adjust error message to match gnu

This commit is contained in:
Michael Debertol 2021-08-03 23:37:49 +02:00
parent 44ae927969
commit 9700f0503d
3 changed files with 5 additions and 5 deletions

View file

@ -61,7 +61,7 @@ impl Config {
.value_of(options::WRAP) .value_of(options::WRAP)
.map(|num| { .map(|num| {
num.parse::<usize>() num.parse::<usize>()
.map_err(|e| format!("Invalid wrap size: '{}': {}", num, e)) .map_err(|_| format!("invalid wrap size: '{}'", num))
}) })
.transpose()?; .transpose()?;

View file

@ -103,7 +103,7 @@ fn test_wrap_bad_arg() {
.arg(wrap_param) .arg(wrap_param)
.arg("b") .arg("b")
.fails() .fails()
.stderr_only("base32: Invalid wrap size: 'b': invalid digit found in string\n"); .stderr_only("base32: invalid wrap size: 'b'\n");
} }
} }
@ -114,7 +114,7 @@ fn test_base32_extra_operand() {
.arg("a.txt") .arg("a.txt")
.arg("b.txt") .arg("b.txt")
.fails() .fails()
.stderr_only("base32: extra operand 'b.txt'"); .stderr_only("base32: extra operand 'b.txt'\nTry 'base32 --help' for more information.");
} }
#[test] #[test]

View file

@ -89,7 +89,7 @@ fn test_wrap_bad_arg() {
.arg(wrap_param) .arg(wrap_param)
.arg("b") .arg("b")
.fails() .fails()
.stderr_only("base64: Invalid wrap size: 'b': invalid digit found in string\n"); .stderr_only("base64: invalid wrap size: 'b'\n");
} }
} }
@ -100,7 +100,7 @@ fn test_base64_extra_operand() {
.arg("a.txt") .arg("a.txt")
.arg("b.txt") .arg("b.txt")
.fails() .fails()
.stderr_only("base64: extra operand 'b.txt'"); .stderr_only("base64: extra operand 'b.txt'\nTry 'base64 --help' for more information.");
} }
#[test] #[test]