浏览代码

Add a test for the legacy Connect function.

Julien Laffaye 10 年之前
父节点
当前提交
7acded32b2
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      client_test.go

+ 14 - 0
client_test.go

@@ -203,6 +203,20 @@ func TestConnIPv6(t *testing.T) {
 	c.Quit()
 }
 
+// TestConnect tests the legacy Connect function
+func TestConnect(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping test in short mode.")
+	}
+
+	c, err := Connect("localhost:21")
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	c.Quit()
+}
+
 func TestTimeout(t *testing.T) {
 	if testing.Short() {
 		t.Skip("skipping test in short mode.")