mirror of
https://github.com/uutils/findutils.git
synced 2026-06-10 15:48:30 -07:00
find: -printf: test octal escape before a multibyte char
Regression test for the panic fixed in #720/#723: a `\NNN` octal escape immediately followed by a multibyte character (`\0€`) used to slice the format string mid-char and abort. Assert `-printf` emits the escape byte and the following character intact.
This commit is contained in:
@@ -510,6 +510,15 @@ fn find_printf() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn find_printf_octal_escape_before_multibyte_char() {
|
||||
ucmd()
|
||||
.args(&["./test_data/simple", "-maxdepth", "0", "-printf", "\\0€\\n"])
|
||||
.succeeds()
|
||||
.no_stderr()
|
||||
.stdout_only("\0€\n");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn find_perm() {
|
||||
|
||||
Reference in New Issue
Block a user