mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-11 17:31:10 +07:00
test/test-device-nodes.c: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
f62066f5da
commit
106c2979b6
@ -26,7 +26,7 @@
|
||||
|
||||
/* helpers for test_encode_devnode_name */
|
||||
static char *do_encode_string(const char *in) {
|
||||
size_t out_len = strlen(in) * 4;
|
||||
size_t out_len = strlen(in) * 4 + 1;
|
||||
char *out = malloc(out_len);
|
||||
|
||||
assert_se(out);
|
||||
@ -46,6 +46,8 @@ static void test_encode_devnode_name(void) {
|
||||
assert_se(expect_encoded_as("pinkiepie", "pinkiepie"));
|
||||
assert_se(expect_encoded_as("valíd\\ųtf8", "valíd\\x5cųtf8"));
|
||||
assert_se(expect_encoded_as("s/ash/ng", "s\\x2fash\\x2fng"));
|
||||
assert_se(expect_encoded_as("/", "\\x2f"));
|
||||
assert_se(expect_encoded_as("!", "\\x21"));
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user