Add a test for the legacy Connect function.

This commit is contained in:
Julien Laffaye 2015-08-21 18:47:44 +02:00
parent d640995c66
commit 7acded32b2

View File

@ -203,6 +203,20 @@ func TestConnIPv6(t *testing.T) {
c.Quit() 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) { func TestTimeout(t *testing.T) {
if testing.Short() { if testing.Short() {
t.Skip("skipping test in short mode.") t.Skip("skipping test in short mode.")