mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
csplit: adjust the error message to match GNU's
Should fix tests/csplit/csplit
This commit is contained in:
parent
e450ce8af2
commit
8551c55ab3
2 changed files with 9 additions and 1 deletions
|
@ -21,7 +21,7 @@ pub enum CsplitError {
|
||||||
MatchNotFound(String),
|
MatchNotFound(String),
|
||||||
#[error("{}: match not found on repetition {}", ._0.quote(), _1)]
|
#[error("{}: match not found on repetition {}", ._0.quote(), _1)]
|
||||||
MatchNotFoundOnRepetition(String, usize),
|
MatchNotFoundOnRepetition(String, usize),
|
||||||
#[error("line number must be greater than zero")]
|
#[error("0: line number must be greater than zero")]
|
||||||
LineNumberIsZero,
|
LineNumberIsZero,
|
||||||
#[error("line number '{}' is smaller than preceding line number, {}", _0, _1)]
|
#[error("line number '{}' is smaller than preceding line number, {}", _0, _1)]
|
||||||
LineNumberSmallerThanPrevious(usize, usize),
|
LineNumberSmallerThanPrevious(usize, usize),
|
||||||
|
|
|
@ -1359,3 +1359,11 @@ fn precision_format() {
|
||||||
assert_eq!(at.read("xx 0x001"), generate(10, 51));
|
assert_eq!(at.read("xx 0x001"), generate(10, 51));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn zero_error() {
|
||||||
|
let (_, mut ucmd) = at_and_ucmd!();
|
||||||
|
ucmd.args(&["in", "0"])
|
||||||
|
.fails()
|
||||||
|
.stderr_contains("0: line number must be greater");
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue