diff options
author | teor <teor@torproject.org> | 2019-11-11 13:04:28 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-11 13:04:28 +1000 |
commit | 2d651f4f6ad864541473f2371ed314352479ce7a (patch) | |
tree | 48db542da08a888c4c4dd2988e57da4453f315ed /src | |
parent | f6c9ca3a1d1c29a293915612e26cdbfeb050c192 (diff) | |
download | tor-2d651f4f6ad864541473f2371ed314352479ce7a.tar.gz tor-2d651f4f6ad864541473f2371ed314352479ce7a.zip |
test/parseconf: Add basic parsing tests
And document the "%include" behaviour.
Closes 32450.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/conf_examples/empty_1/expected | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_1/torrc | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_2/cmdline | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_2/expected | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_2/torrc | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_2/torrc.defaults | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_3/expected | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_3/included/empty | 0 | ||||
-rw-r--r-- | src/test/conf_examples/empty_3/torrc | 1 | ||||
-rw-r--r-- | src/test/conf_examples/empty_4/error | 1 | ||||
-rwxr-xr-x | src/test/test_parseconf.sh | 5 |
11 files changed, 7 insertions, 0 deletions
diff --git a/src/test/conf_examples/empty_1/expected b/src/test/conf_examples/empty_1/expected new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_1/expected diff --git a/src/test/conf_examples/empty_1/torrc b/src/test/conf_examples/empty_1/torrc new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_1/torrc diff --git a/src/test/conf_examples/empty_2/cmdline b/src/test/conf_examples/empty_2/cmdline new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_2/cmdline diff --git a/src/test/conf_examples/empty_2/expected b/src/test/conf_examples/empty_2/expected new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_2/expected diff --git a/src/test/conf_examples/empty_2/torrc b/src/test/conf_examples/empty_2/torrc new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_2/torrc diff --git a/src/test/conf_examples/empty_2/torrc.defaults b/src/test/conf_examples/empty_2/torrc.defaults new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_2/torrc.defaults diff --git a/src/test/conf_examples/empty_3/expected b/src/test/conf_examples/empty_3/expected new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_3/expected diff --git a/src/test/conf_examples/empty_3/included/empty b/src/test/conf_examples/empty_3/included/empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_examples/empty_3/included/empty diff --git a/src/test/conf_examples/empty_3/torrc b/src/test/conf_examples/empty_3/torrc new file mode 100644 index 0000000000..049b438903 --- /dev/null +++ b/src/test/conf_examples/empty_3/torrc @@ -0,0 +1 @@ +%include "included" diff --git a/src/test/conf_examples/empty_4/error b/src/test/conf_examples/empty_4/error new file mode 100644 index 0000000000..e6c2f7d885 --- /dev/null +++ b/src/test/conf_examples/empty_4/error @@ -0,0 +1 @@ +Unable to open configuration file
\ No newline at end of file diff --git a/src/test/test_parseconf.sh b/src/test/test_parseconf.sh index 85a23a6a36..8d41438b2e 100755 --- a/src/test/test_parseconf.sh +++ b/src/test/test_parseconf.sh @@ -28,6 +28,11 @@ # cmdline -- Optional. If present, it contains command-line arguments that # will be passed to Tor. # +# (included torrc files or directories) -- Optional. If present, and +# configured in the torrc* or cmdline, these files or directories are +# included. Include paths should be specified relative to the test case +# directory. +# # expected -- If this file is present, then it should be the expected result # of "--dump-config short" for this test case. Exactly one of # "expected" or "error" must be present, or the test will fail. |