mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tr: fix graph/print character class mapping (#11405)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
co-authored by
Sylvestre Ledru
parent
230e0cfd65
commit
358063f336
@@ -65,6 +65,38 @@ fn test_delete() {
|
||||
.stdout_is("BD");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delete_graph_and_print_match_gnu() {
|
||||
let input = [b' ', b'A', b'!', b'\t', b'\n'];
|
||||
new_ucmd!()
|
||||
.args(&["-d", "[:graph:]"])
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_is_bytes([b' ', b'\t', b'\n']);
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["-d", "[:print:]"])
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_is_bytes([b'\t', b'\n']);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delete_complement_graph_and_print_match_gnu() {
|
||||
let input = [b' ', b'A', b'!', b'\t', b'\n'];
|
||||
new_ucmd!()
|
||||
.args(&["-d", "-c", "[:graph:]"])
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_is_bytes([b'A', b'!']);
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["-d", "-c", "[:print:]"])
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_is_bytes([b' ', b'A', b'!']);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delete_afterwards_is_not_flag() {
|
||||
new_ucmd!()
|
||||
|
||||
Reference in New Issue
Block a user