mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
test_printf: add test for additional escape (\c)
Using this escaped character will cause `printf` to stop generating characters. For instance, ```rust hbina@akarin ~/g/uutils (hbina-add-test-for-additional-escape)> cargo run --quiet -- printf "%s\c%s" a b a⏎ ``` Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
This commit is contained in:
parent
572a505119
commit
793d3dd97c
1 changed files with 8 additions and 0 deletions
|
@ -429,3 +429,11 @@ fn sub_any_specifiers_after_second_param() {
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only("3");
|
.stdout_only("3");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn stop_after_additional_escape() {
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&["A%sC\\cD%sF", "B", "E"]) //spell-checker:disable-line
|
||||||
|
.succeeds()
|
||||||
|
.stdout_only("ABC");
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue