mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
sort: generate test_start_buffer fixtures programmatically
This commit is contained in:
committed by
Sylvestre Ledru
parent
3651d73a40
commit
25e269cbf8
@@ -1909,7 +1909,22 @@ fn test_color_environment_variables() {
|
||||
#[test]
|
||||
fn test_start_buffer() {
|
||||
// Test that a file with the exact same size as the start buffer is handled correctly
|
||||
test_helper("start_buffer_b", &["start_buffer_a.txt"]);
|
||||
const FILE_B: &[u8] = &[b'b'; 8_000];
|
||||
const FILE_A: &[u8] = b"aaa";
|
||||
|
||||
let mut expected = FILE_A.to_vec();
|
||||
expected.push(b'\n');
|
||||
expected.extend_from_slice(FILE_B);
|
||||
expected.push(b'\n');
|
||||
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
at.write_bytes("b", FILE_B);
|
||||
at.write_bytes("a", FILE_A);
|
||||
|
||||
ucmd.args(&["b", "a"])
|
||||
.succeeds()
|
||||
.stdout_only_bytes(&expected);
|
||||
}
|
||||
|
||||
/* spell-checker: enable */
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
aaa
|
||||
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user