mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
split: error when --additional-suffix contains /
Make `split` terminate with a usage error when the `--additional-suffix` argument contains a directory separator character.
This commit is contained in:
parent
e818fd2b98
commit
2f65b29866
2 changed files with 25 additions and 2 deletions
|
@ -228,6 +228,14 @@ fn test_split_additional_suffix() {
|
|||
assert_eq!(glob.collate(), at.read_bytes(name));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_additional_suffix_no_slash() {
|
||||
new_ucmd!()
|
||||
.args(&["--additional-suffix", "a/b"])
|
||||
.fails()
|
||||
.usage_error("invalid suffix 'a/b', contains directory separator");
|
||||
}
|
||||
|
||||
// note: the test_filter* tests below are unix-only
|
||||
// windows support has been waived for now because of the difficulty of getting
|
||||
// the `cmd` call right
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue