diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-01-09 17:46:26 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-01-09 17:46:26 -0500 |
commit | 106c2979b6bc1bda8f143878c15747888d9b0c0c (patch) | |
tree | 08f04eb5d6e0e4b908ef5cfedbd2979ad8af8eb1 /test | |
parent | f62066f5da62f622ccf5ebad03e56c7839d1fd53 (diff) |
test/test-device-nodes.c: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-device-nodes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test-device-nodes.c b/test/test-device-nodes.c index 2f3dedb90f..59ba4be087 100644 --- a/test/test-device-nodes.c +++ b/test/test-device-nodes.c @@ -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[]) { |