]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test: a file with no config options, at the end of an %include directory
authorteor <teor@torproject.org>
Mon, 23 Sep 2019 02:29:25 +0000 (12:29 +1000)
committerteor <teor@torproject.org>
Tue, 24 Sep 2019 01:10:50 +0000 (11:10 +1000)
(The file must contain whitespace or comments to trigger the bug.)

Regression test for 31408.

src/test/conf_examples/include_bug_31408/expected [new file with mode: 0644]
src/test/conf_examples/include_bug_31408/included/01_nickname.inc [new file with mode: 0644]
src/test/conf_examples/include_bug_31408/included/02_no_configs.inc [new file with mode: 0644]
src/test/conf_examples/include_bug_31408/torrc [new file with mode: 0644]

diff --git a/src/test/conf_examples/include_bug_31408/expected b/src/test/conf_examples/include_bug_31408/expected
new file mode 100644 (file)
index 0000000..2e822f1
--- /dev/null
@@ -0,0 +1,2 @@
+Nickname test31408
+ORPort 31408
diff --git a/src/test/conf_examples/include_bug_31408/included/01_nickname.inc b/src/test/conf_examples/include_bug_31408/included/01_nickname.inc
new file mode 100644 (file)
index 0000000..508dd89
--- /dev/null
@@ -0,0 +1 @@
+Nickname test31408
diff --git a/src/test/conf_examples/include_bug_31408/included/02_no_configs.inc b/src/test/conf_examples/include_bug_31408/included/02_no_configs.inc
new file mode 100644 (file)
index 0000000..140e927
--- /dev/null
@@ -0,0 +1,3 @@
+# Bug 31048 is triggered when the last file in a config directory:
+#   * contains no configuration options,
+#   * but is non-empty: that is, it contains comments or whitespace.
diff --git a/src/test/conf_examples/include_bug_31408/torrc b/src/test/conf_examples/include_bug_31408/torrc
new file mode 100644 (file)
index 0000000..a42685e
--- /dev/null
@@ -0,0 +1,2 @@
+%include "included"
+ORPort 31408