mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 18:55:09 +03:00
test-util: don't mix declarations and code
This commit is contained in:
parent
449a22a58f
commit
5d84c44a97
@ -416,10 +416,10 @@ static void test_cescape(void) {
|
||||
|
||||
static void test_cunescape(void) {
|
||||
_cleanup_free_ char *unescaped;
|
||||
const char *x = "abc\\\"\b\f\a\n\r\t\v\003\177\234\313\\000\\x00";
|
||||
|
||||
assert_se(cunescape("abc\\\\\\\"\\b\\f\\a\\n\\r\\t\\v\\003\\177\\234\\313\\000\\x00", 0, &unescaped) < 0);
|
||||
assert_se(cunescape("abc\\\\\\\"\\b\\f\\a\\n\\r\\t\\v\\003\\177\\234\\313\\000\\x00", UNESCAPE_RELAX, &unescaped) >= 0);
|
||||
const char *x = "abc\\\"\b\f\a\n\r\t\v\003\177\234\313\\000\\x00";
|
||||
assert_se(streq_ptr(unescaped, x));
|
||||
free(unescaped);
|
||||
unescaped = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user