Переглянути джерело

Add test for +Option, /Option, and Option

Here we use these directives to replace, extend, or clear values in
torrc.defaults and in torrc.
Nick Mathewson 5 роки тому
батько
коміт
850a00dc07

+ 1 - 0
src/test/conf_examples/ops_1/cmdline

@@ -0,0 +1 @@
+ORPort 1000

+ 2 - 0
src/test/conf_examples/ops_1/expected

@@ -0,0 +1,2 @@
+Nickname Unnamed
+ORPort 1000

+ 3 - 0
src/test/conf_examples/ops_1/torrc

@@ -0,0 +1,3 @@
+# We'll replace this option on the command line.
+
+ORPort 9999

+ 1 - 0
src/test/conf_examples/ops_2/cmdline

@@ -0,0 +1 @@
+/ORPort

+ 0 - 0
src/test/conf_examples/ops_2/expected


+ 3 - 0
src/test/conf_examples/ops_2/torrc

@@ -0,0 +1,3 @@
+# We'll remove this option on the command line, and not replace it.
+
+ORPort 9999

+ 1 - 0
src/test/conf_examples/ops_3/cmdline

@@ -0,0 +1 @@
++ORPort 1000

+ 3 - 0
src/test/conf_examples/ops_3/expected

@@ -0,0 +1,3 @@
+Nickname Unnamed
+ORPort 9999
+ORPort 1000

+ 3 - 0
src/test/conf_examples/ops_3/torrc

@@ -0,0 +1,3 @@
+# We will extend this option on the command line
+
+ORPort 9999

+ 2 - 0
src/test/conf_examples/ops_4/expected

@@ -0,0 +1,2 @@
+Nickname Unnamed
+ORPort 9099

+ 3 - 0
src/test/conf_examples/ops_4/torrc

@@ -0,0 +1,3 @@
+# This value is unadorned, so replaces the one from defaults.torrc.
+
+ORPort 9099

+ 1 - 0
src/test/conf_examples/ops_4/torrc.defaults

@@ -0,0 +1 @@
+ORPort 9000

+ 3 - 0
src/test/conf_examples/ops_5/expected

@@ -0,0 +1,3 @@
+Nickname Unnamed
+ORPort 9000
+ORPort 9099

+ 3 - 0
src/test/conf_examples/ops_5/torrc

@@ -0,0 +1,3 @@
+# This value has a plus, and so extends the one from defaults.torrc.
+
++ORPort 9099

+ 1 - 0
src/test/conf_examples/ops_5/torrc.defaults

@@ -0,0 +1 @@
+ORPort 9000

+ 0 - 0
src/test/conf_examples/ops_6/expected


+ 3 - 0
src/test/conf_examples/ops_6/torrc

@@ -0,0 +1,3 @@
+# This value has a slash, and so clears the one from defaults.torrc.
+
+/ORPort

+ 1 - 0
src/test/conf_examples/ops_6/torrc.defaults

@@ -0,0 +1 @@
+ORPort 9000