diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-19 09:55:22 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-19 09:55:22 -0400 |
commit | 3628efe29c170025cec1001001a141dc3f9c5860 (patch) | |
tree | 7c17a29127dd2f521875d16a8761aef5221f1925 | |
parent | 3c6d5e10a06857cfb60b517a8d0349a119a99f13 (diff) | |
download | tor-3628efe29c170025cec1001001a141dc3f9c5860.tar.gz tor-3628efe29c170025cec1001001a141dc3f9c5860.zip |
Try to fix windows config/include_path_syntax test
It was trying to do %include "foo\", which won't work. It has to be
%include "foo\\".
-rw-r--r-- | src/test/test_config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c index 8419acbce8..80579eaa91 100644 --- a/src/test/test_config.c +++ b/src/test/test_config.c @@ -5172,11 +5172,17 @@ test_config_include_path_syntax(void *data) tt_int_op(mkdir(dir, 0700), OP_EQ, 0); #endif +#ifdef _WIN32 +#define ESCAPED_PATH_SEPARATOR "\\" PATH_SEPARATOR +#else +#define ESCAPED_PATH_SEPARATOR PATH_SEPARATOR +#endif + char torrc_contents[1000]; tor_snprintf(torrc_contents, sizeof(torrc_contents), "%%include \"%s\"\n" "%%include %s"PATH_SEPARATOR"\n" - "%%include \"%s"PATH_SEPARATOR"\"\n", + "%%include \"%s"ESCAPED_PATH_SEPARATOR"\"\n", dir, dir, dir); int include_used; |