diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-09-11 01:25:48 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-09-11 01:41:23 +0200 |
commit | a05ef55b66684d3355b213f8df366c23d0128eca (patch) | |
tree | ce899d00b4d26a0a02617f27c6a86aa48254ab9b /src/test | |
parent | 07049b3d25cbc397dd39c71d32422bfd7c39d814 (diff) | |
download | tor-a05ef55b66684d3355b213f8df366c23d0128eca.tar.gz tor-a05ef55b66684d3355b213f8df366c23d0128eca.zip |
Allow comments for multi-line torrc options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 84bb5a67f4..49823fde70 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -103,6 +103,8 @@ test_util_config_line(void) "k9 a line that\\\n spans two lines.\n\n" "k10 more than\\\n one contin\\\nuation\n" "k11 \\\ncontinuation at the start\n" + "k12 line with a\\\n#comment\n embedded\n" + "k13\\\ncontinuation at the very start\n" , sizeof(buf)); str = buf; @@ -180,6 +182,16 @@ test_util_config_line(void) test_streq(v, "continuation at the start"); tor_free(k); tor_free(v); + str = parse_config_line_from_str(str, &k, &v); + test_streq(k, "k12"); + test_streq(v, "line with a embedded"); + tor_free(k); tor_free(v); + + str = parse_config_line_from_str(str, &k, &v); + test_streq(k, "k13"); + test_streq(v, "continuation at the very start"); + tor_free(k); tor_free(v); + test_streq(str, ""); done: |