From 5bb86ee66f87bef03c864c966010a965a7bdd62d Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Thu, 20 Aug 2015 01:46:22 +0200 Subject: [PATCH] Test PASV as well --- client_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/client_test.go b/client_test.go index b383ddf..d2873f9 100644 --- a/client_test.go +++ b/client_test.go @@ -13,7 +13,15 @@ const ( testDir = "mydir" ) -func TestConn(t *testing.T) { +func TestConnPASV(t *testing.T) { + testConn(t, true) +} + +func TestConnEPSV(t *testing.T) { + testConn(t, false) +} + +func testConn(t *testing.T, passive bool) { if testing.Short() { t.Skip("skipping test in short mode.") } @@ -23,6 +31,10 @@ func TestConn(t *testing.T) { t.Fatal(err) } + if passive { + delete(c.features, "EPSV") + } + err = c.Login("anonymous", "anonymous") if err != nil { t.Fatal(err)