mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge branch 'main' into truncate-no-such-dir
This commit is contained in:
commit
57ee6b5302
114 changed files with 424 additions and 246 deletions
|
@ -386,3 +386,15 @@ fn test_no_such_dir() {
|
|||
.no_stdout()
|
||||
.stderr_contains("cannot open 'a/b' for writing: No such file or directory");
|
||||
}
|
||||
|
||||
/// Test that truncate with a relative size less than 0 is not an error.
|
||||
#[test]
|
||||
fn test_underflow_relative_size() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["-s-1", FILE1])
|
||||
.succeeds()
|
||||
.no_stdout()
|
||||
.no_stderr();
|
||||
assert!(at.file_exists(FILE1));
|
||||
assert!(at.read_bytes(FILE1).is_empty());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue