mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 19:36:16 +00:00
Merge branch 'main' into rm-correct-prompts
This commit is contained in:
commit
87df47dee3
9 changed files with 284 additions and 159 deletions
|
@ -1395,7 +1395,7 @@ fn test_cp_reflink_bad() {
|
|||
.arg(TEST_HELLO_WORLD_SOURCE)
|
||||
.arg(TEST_EXISTING_FILE)
|
||||
.fails()
|
||||
.stderr_contains("error: \"bad\" isn't a valid value for '--reflink[=<WHEN>]'");
|
||||
.stderr_contains("error: 'bad' isn't a valid value for '--reflink[=<WHEN>]'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -92,14 +92,14 @@ fn test_mknod_character_device_requires_major_and_minor() {
|
|||
.arg("1")
|
||||
.arg("c")
|
||||
.fails()
|
||||
.stderr_contains("Invalid value \"c\"");
|
||||
.stderr_contains("Invalid value 'c'");
|
||||
new_ucmd!()
|
||||
.arg("test_file")
|
||||
.arg("c")
|
||||
.arg("c")
|
||||
.arg("1")
|
||||
.fails()
|
||||
.stderr_contains("Invalid value \"c\"");
|
||||
.stderr_contains("Invalid value 'c'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -659,6 +659,22 @@ fn test_line_bytes_no_empty_file() {
|
|||
assert!(!at.plus("xak").exists());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_line_bytes_no_eof() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["-C", "3"])
|
||||
.pipe_in("1\n2222\n3\n4")
|
||||
.succeeds()
|
||||
.no_stdout()
|
||||
.no_stderr();
|
||||
assert_eq!(at.read("xaa"), "1\n");
|
||||
assert_eq!(at.read("xab"), "222");
|
||||
assert_eq!(at.read("xac"), "2\n");
|
||||
assert_eq!(at.read("xad"), "3\n");
|
||||
assert_eq!(at.read("xae"), "4");
|
||||
assert!(!at.plus("xaf").exists());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_guard_input() {
|
||||
let ts = TestScenario::new(util_name!());
|
||||
|
|
4
tests/fixtures/split/noeof.txt
vendored
Normal file
4
tests/fixtures/split/noeof.txt
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
1
|
||||
2222
|
||||
3
|
||||
4
|
Loading…
Add table
Add a link
Reference in a new issue