Skip to content

Commit

Permalink
Add new test to verify GNU compatible quotation.
Browse files Browse the repository at this point in the history
Co-authored-by: anastygnome <[email protected]>
  • Loading branch information
gkalas8 and anastygnome committed Jul 1, 2022
1 parent 4f043ff commit bd96f25
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/by-util/test_wc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ fn test_single_all_counts() {
.stdout_is(" 5 57 302 302 66 alice_in_wonderland.txt\n");
}

#[cfg(unix)]
#[test]
fn test_gnu_compatible_quotation() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.mkdir("some-dir1");
at.touch("some-dir1/12\n34.txt");
scene
.ucmd()
.args(&["some-dir1/12\n34.txt"])
.run()
.stdout_is("0 0 0 'some-dir1/12'$'\\n''34.txt'\n");
}

#[test]
fn test_multiple_default() {
new_ucmd!()
Expand Down

0 comments on commit bd96f25

Please sign in to comment.