mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
test-escape: Add tests for escaping bogus UTF-8 sequences
This commit is contained in:
parent
00f57157f3
commit
582843ee37
|
@ -196,6 +196,10 @@ TEST(shell_maybe_quote) {
|
|||
|
||||
test_shell_maybe_quote_one("głąb\002\003rząd", 0, "\"głąb\\002\\003rząd\"");
|
||||
test_shell_maybe_quote_one("głąb\002\003rząd", SHELL_ESCAPE_POSIX, "$'głąb\\002\\003rząd'");
|
||||
|
||||
/* Bogus UTF-8 strings */
|
||||
test_shell_maybe_quote_one("\250\350", 0, "\"\\250\\350\"");
|
||||
test_shell_maybe_quote_one("\250\350", SHELL_ESCAPE_POSIX, "$'\\250\\350'");
|
||||
}
|
||||
|
||||
static void test_quote_command_line_one(char **argv, const char *expected) {
|
||||
|
|
Loading…
Reference in a new issue