[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [goptlib/master] Add a test for non-interpretation of escapes in transport lists.



commit b6b24f6815f01c3ca61bb22e39b99e1af52a94a4
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Aug 5 14:54:18 2015 -0700

    Add a test for non-interpretation of escapes in transport lists.
---
 pt_test.go |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/pt_test.go b/pt_test.go
index 93fa491..0d641fe 100644
--- a/pt_test.go
+++ b/pt_test.go
@@ -164,6 +164,11 @@ func TestGetClientTransports(t *testing.T) {
 			"alpha,*,gamma",
 			[]string{"alpha", "*", "gamma"},
 		},
+		// No escaping is defined for TOR_PT_CLIENT_TRANSPORTS.
+		{
+			`alpha\,beta`,
+			[]string{`alpha\`, `beta`},
+		},
 	}
 
 	Stdout = ioutil.Discard
@@ -290,6 +295,13 @@ func TestGetServerBindaddrs(t *testing.T) {
 			"alpha",
 			"key=value",
 		},
+		// no escaping is defined for TOR_PT_SERVER_TRANSPORTS or
+		// TOR_PT_SERVER_BINDADDR.
+		{
+			`alpha\,beta-1.2.3.4:1111`,
+			`alpha\,beta`,
+			"",
+		},
 	}
 	goodTests := [...]struct {
 		ptServerBindaddr         string

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits