diff --git a/src/protocol/ftp/parse.c b/src/protocol/ftp/parse.c index 78fea3341..770dc4cf8 100644 --- a/src/protocol/ftp/parse.c +++ b/src/protocol/ftp/parse.c @@ -62,16 +62,7 @@ parse_ftp_number(unsigned char **src, unsigned char *end, long from, long to) /* Parser for the EPLF format (see http://pobox.com/~djb/proto/eplf.txt). * * Lines end with \r\n (CR-LF), but that is handled elsewhere. - * - * Some example EPLF response, with the filename separator (tab) displayed as a - * space: */ -#ifdef DEBUG_FTP_PARSER -static unsigned char ftp_eplf_responses[] = - "+i8388621.48594,m825718503,r,s280,\tdjb.html\r\n" - "+i8388621.50690,m824255907,/,\t514\r\n" - "+i8388621.48598,m824253270,r,s612,\t514.html\r\n"; -#endif enum ftp_eplf { FTP_EPLF_FILENAME = ASCII_TAB, /* Filename follows */ diff --git a/src/protocol/ftp/test-ftp-parser b/src/protocol/ftp/test-ftp-parser index 0da91a620..8cdd536da 100644 --- a/src/protocol/ftp/test-ftp-parser +++ b/src/protocol/ftp/test-ftp-parser @@ -19,7 +19,7 @@ test_ftp_response_expect_success () { response="$(echo "$response" | sed -n '2,$p')" test_expect_success "$desc" \ - "ftp-parser --response '$response'" + "ftp-parser --response \"$response\"" } test_ftp_response_expect_failure () { @@ -29,7 +29,7 @@ test_ftp_response_expect_failure () { response="$(echo "$response" | sed -n '2,$p')" test_expect_failure "$desc" \ - "ftp-parser --response '$response'" + "ftp-parser --response \"$response\"" } ############################################################################# @@ -74,6 +74,18 @@ test_ftp_response_expect_success \ drwxrwxr-x folder 2 May 10 1996 network\r\n" +############################################################################# +# +# EPLF response +# + +test_ftp_response_expect_success \ +'EPLF responses' \ +$' ++i8388621.48594,m825718503,r,s280,\tdjb.html\r\n ++i8388621.50690,m824255907,/,\t514\r\n ++i8388621.48598,m824253270,r,s612,\t514.html\r\n' + ############################################################################# # # Parser for VMS-style MultiNet (some spaces removed from examples)