Skip to content

Commit 0f72a5b

Browse files
xtqqczzecakebaker
authored andcommitted
1 parent 091dbbb commit 0f72a5b

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

tests/by-util/test_env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,8 +1707,8 @@ mod test_raw_string_parser {
17071707
let mut buffer = [0u8; 4];
17081708
let owl = '🦉'.encode_utf8(&mut buffer);
17091709
owl_invalid_part = owl.bytes().next().unwrap();
1710-
brace_1 = [b'<'].to_vec();
1711-
brace_2 = [b'>'].to_vec();
1710+
brace_1 = b"<".to_vec();
1711+
brace_2 = b">".to_vec();
17121712
}
17131713
let mut input_ux = brace_1;
17141714
input_ux.push(owl_invalid_part);

tests/by-util/test_numfmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ fn test_format_precision_zero_with_to_scale_issue_11667() {
15071507
fn test_invalid_utf8_input() {
15081508
// 0xFF is invalid UTF-8
15091509
new_ucmd!()
1510-
.pipe_in([b'1', b'0', b'\n', b'\xFF'])
1510+
.pipe_in(*b"10\n\xFF")
15111511
.fails_with_code(2)
15121512
.stdout_is("10\n")
15131513
.stderr_is("numfmt: invalid number: '\\377'\n");

tests/by-util/test_tr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,34 +75,34 @@ fn test_delete() {
7575

7676
#[test]
7777
fn test_delete_graph_and_print_match_gnu() {
78-
let input = [b' ', b'A', b'!', b'\t', b'\n'];
78+
let input = *b" A!\t\n";
7979
new_ucmd!()
8080
.args(&["-d", "[:graph:]"])
8181
.pipe_in(input)
8282
.succeeds()
83-
.stdout_is_bytes([b' ', b'\t', b'\n']);
83+
.stdout_is_bytes(*b" \t\n");
8484

8585
new_ucmd!()
8686
.args(&["-d", "[:print:]"])
8787
.pipe_in(input)
8888
.succeeds()
89-
.stdout_is_bytes([b'\t', b'\n']);
89+
.stdout_is_bytes(*b"\t\n");
9090
}
9191

9292
#[test]
9393
fn test_delete_complement_graph_and_print_match_gnu() {
94-
let input = [b' ', b'A', b'!', b'\t', b'\n'];
94+
let input = *b" A!\t\n";
9595
new_ucmd!()
9696
.args(&["-d", "-c", "[:graph:]"])
9797
.pipe_in(input)
9898
.succeeds()
99-
.stdout_is_bytes([b'A', b'!']);
99+
.stdout_is_bytes(*b"A!");
100100

101101
new_ucmd!()
102102
.args(&["-d", "-c", "[:print:]"])
103103
.pipe_in(input)
104104
.succeeds()
105-
.stdout_is_bytes([b' ', b'A', b'!']);
105+
.stdout_is_bytes(*b" A!");
106106
}
107107

108108
#[test]

0 commit comments

Comments
 (0)