diff options
author | Taylor Yu <catalyst@torproject.org> | 2019-07-03 16:35:35 -0500 |
---|---|---|
committer | Taylor Yu <catalyst@torproject.org> | 2019-12-08 17:09:43 -0600 |
commit | 1e8bb79bbe9befd86e018e0d5f6d960e9c789462 (patch) | |
tree | c18b7b292b30fa7e1b4a315d7d0d81d8427938d2 /src/test/test_config.c | |
parent | 4b22c739fe8b04b05e7bdfdf18ec42ec4bf1c436 (diff) | |
download | tor-1e8bb79bbe9befd86e018e0d5f6d960e9c789462.tar.gz tor-1e8bb79bbe9befd86e018e0d5f6d960e9c789462.zip |
add KV_RAW to kvline.c
Add the KV_RAW flag to kvline_encode(). This allows generation of
output that is compatible with some quirks of the control protocol.
Part of #30984.
Diffstat (limited to 'src/test/test_config.c')
-rw-r--r-- | src/test/test_config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c index 6294e21f04..8f705da7e0 100644 --- a/src/test/test_config.c +++ b/src/test/test_config.c @@ -6072,6 +6072,14 @@ test_config_kvline_parse(void *arg) lines->value = tor_strdup("CD"); enc = kvline_encode(lines, 0); tt_assert(!enc); + config_free_lines(lines); + + config_line_append(&lines, "A", "B C"); + enc = kvline_encode(lines, 0); + tt_assert(!enc); + enc = kvline_encode(lines, KV_RAW); + tt_assert(enc); + tt_str_op(enc, OP_EQ, "A=B C"); done: config_free_lines(lines); |