[tor-commits] [goptlib/master] Add a test for non-interpretation of escapes in transport lists.
dcf at torproject.org
dcf at torproject.org
Wed Aug 5 22:00:59 UTC 2015
commit b6b24f6815f01c3ca61bb22e39b99e1af52a94a4
Author: David Fifield <david at bamsoftware.com>
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
More information about the tor-commits
mailing list