From 342dfb0cb55c6d2c8400b804fa9cd55ee2c5161b Mon Sep 17 00:00:00 2001 From: Jean-Luc Lacroix Date: Fri, 1 Dec 2023 10:54:12 +0100 Subject: [PATCH] Update parse_test.go Add new test for non standard date format returned by LIST --- parse_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parse_test.go b/parse_test.go index 8bcd45a..f53a61e 100644 --- a/parse_test.go +++ b/parse_test.go @@ -68,7 +68,9 @@ var listTests = []line{ // DOS DIR command output {"08-07-15 07:50PM 718 Post_PRR_20150901_1166_265118_13049.dat", "Post_PRR_20150901_1166_265118_13049.dat", 718, EntryTypeFile, newTime(2015, time.August, 7, 19, 50)}, {"08-10-15 02:04PM Billing", "Billing", 0, EntryTypeFolder, newTime(2015, time.August, 10, 14, 4)}, - + {"08-07-2015 07:50PM 718 Post_PRR_20150901_1166_265118_13049.dat", "Post_PRR_20150901_1166_265118_13049.dat", 718, EntryTypeFile, newTime(2015, time.August, 7, 19, 50)}, + {"08-10-2015 02:04PM Billing", "Billing", 0, EntryTypeFolder, newTime(2015, time.August, 10, 14, 4)}, + // dir and file names that contain multiple spaces {"drwxr-xr-x 3 110 1002 3 Dec 02 2009 spaces dir name", "spaces dir name", 0, EntryTypeFolder, newTime(2009, time.December, 2)}, {"-rwxr-xr-x 3 110 1002 1234567 Dec 02 2009 file name", "file name", 1234567, EntryTypeFile, newTime(2009, time.December, 2)},