diff options
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 2cc25e986..54a089b36 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -803,30 +803,30 @@ test_util_escape_string_socks(void) char *escaped_string = NULL; /** Simple backslash escape. */ - escaped_string = tor_escape_str_for_socks_arg("This is a backslash: \\"); + escaped_string = tor_escape_str_for_socks_arg("This is a backslash: \\", ";\\"); test_assert(escaped_string); test_streq(escaped_string, "This is a backslash: \\\\"); tor_free(escaped_string); /** Simple semicolon escape. */ - escaped_string = tor_escape_str_for_socks_arg("First rule: Do not use ;"); + escaped_string = tor_escape_str_for_socks_arg("First rule: Do not use ;", ";\\"); test_assert(escaped_string); test_streq(escaped_string, "First rule: Do not use \\;"); tor_free(escaped_string); /** Empty string. */ - escaped_string = tor_escape_str_for_socks_arg(""); + escaped_string = tor_escape_str_for_socks_arg("", ";\\"); test_assert(escaped_string); test_streq(escaped_string, ""); tor_free(escaped_string); /** Escape all characters. */ - escaped_string = tor_escape_str_for_socks_arg(";\\;\\"); + escaped_string = tor_escape_str_for_socks_arg(";\\;\\", ";\\"); test_assert(escaped_string); test_streq(escaped_string, "\\;\\\\\\;\\\\"); tor_free(escaped_string); - escaped_string = tor_escape_str_for_socks_arg(";"); + escaped_string = tor_escape_str_for_socks_arg(";", ";\\"); test_assert(escaped_string); test_streq(escaped_string, "\\;"); tor_free(escaped_string); |