commit 2d651f4f6ad864541473f2371ed314352479ce7a
Author: teor <[email protected]>
Date: Mon Nov 11 13:04:28 2019 +1000
test/parseconf: Add basic parsing tests
And document the "%include" behaviour.
Closes 32450.
---
src/test/conf_examples/empty_1/expected | 0
src/test/conf_examples/empty_1/torrc | 0
src/test/conf_examples/empty_2/cmdline | 0
src/test/conf_examples/empty_2/expected | 0
src/test/conf_examples/empty_2/torrc | 0
src/test/conf_examples/empty_2/torrc.defaults | 0
src/test/conf_examples/empty_3/expected | 0
src/test/conf_examples/empty_3/included/empty | 0
src/test/conf_examples/empty_3/torrc | 1 +
src/test/conf_examples/empty_4/error | 1 +
src/test/test_parseconf.sh | 5 +++++
11 files changed, 7 insertions(+)
diff --git a/src/test/conf_examples/empty_1/expected
b/src/test/conf_examples/empty_1/expected
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/test/conf_examples/empty_1/torrc
b/src/test/conf_examples/empty_1/torrc
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/test/conf_examples/empty_2/cmdline
b/src/test/conf_examples/empty_2/cmdline
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/test/conf_examples/empty_2/expected
b/src/test/conf_examples/empty_2/expected
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/test/conf_examples/empty_2/torrc
b/src/test/conf_examples/empty_2/torrc
new file mode 100644
index 000000000..e69de29bb
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 000000000..e69de29bb
diff --git a/src/test/conf_examples/empty_3/expected
b/src/test/conf_examples/empty_3/expected
new file mode 100644
index 000000000..e69de29bb
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 000000000..e69de29bb
diff --git a/src/test/conf_examples/empty_3/torrc
b/src/test/conf_examples/empty_3/torrc
new file mode 100644
index 000000000..049b43890
--- /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 000000000..e6c2f7d88
--- /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 85a23a6a3..8d41438b2 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.
_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits