commit 736b0a63b6d2cd60a97682732c279ee56d7ccaa4
Author: David Fifield <[email protected]>
Date:   Sun Dec 8 02:32:19 2013 -0800

    Add examples from pt-spec.txt.
---
 args_test.go |    8 ++++++++
 pt_test.go   |    9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/args_test.go b/args_test.go
index 078c79a..ece7a50 100644
--- a/args_test.go
+++ b/args_test.go
@@ -162,6 +162,14 @@ func TestParseClientParameters(t *testing.T) {
                        "a\\=b=c",
                        Args{"a=b": []string{"c"}},
                },
+               {
+                       "shared-secret=rahasia;secrets-file=/tmp/blob",
+                       Args{"shared-secret": []string{"rahasia"}, 
"secrets-file": []string{"/tmp/blob"}},
+               },
+               {
+                       "rocks=20;height=5.6",
+                       Args{"rocks": []string{"20"}, "height": 
[]string{"5.6"}},
+               },
        }
 
        for _, input := range badTests {
diff --git a/pt_test.go b/pt_test.go
index 6da0322..1d30ff2 100644
--- a/pt_test.go
+++ b/pt_test.go
@@ -305,6 +305,15 @@ func TestGetServerBindaddrs(t *testing.T) {
                                {"beta", &net.TCPAddr{IP: 
net.ParseIP("1:2::3:4"), Port: 2222}},
                        },
                },
+               {
+                       "trebuchet-127.0.0.1:1984,ballista-127.0.0.1:4891",
+                       "trebuchet,ballista",
+                       []string{"trebuchet", "ballista"},
+                       []Bindaddr{
+                               {"trebuchet", &net.TCPAddr{IP: 
net.ParseIP("127.0.0.1"), Port: 1984}},
+                               {"ballista", &net.TCPAddr{IP: 
net.ParseIP("127.0.0.1"), Port: 4891}},
+                       },
+               },
        }
 
        Stdout = ioutil.Discard



_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to