Bug 1402151, part 4 - Fix some FTP parser tests. r=michal draft
authorAndrew McCreight <continuation@gmail.com>
Mon, 25 Sep 2017 11:26:18 -0700
changeset 680194 c5262ac49a7c77f2999bdad40139a346ac010279
parent 680193 039f667d73333b332fe8b77a29800f16e6aa521a
child 680195 605e13281fa1d4859684202bf4c339c55547efb4
push id84417
push userbmo:continuation@gmail.com
push dateFri, 13 Oct 2017 16:41:48 +0000
reviewersmichal
bugs1402151, 22299
milestone58.0a1
Bug 1402151, part 4 - Fix some FTP parser tests. r=michal D-WinNT: The parser treats <JUNCTION> without an arrow as junk for some reason. Chrome's FTP directory listing parser doesn't seem to support <JUNCTION> at all, so it can't be too important. I just deleted that from the expected output to match Firefox's current behavior. I also added basic tests for three bugs that were fixed without any tests landed. E-EPLF.out: Add a license to the top. U-WinNT.out: We're not testing junk or comment output, and we don't use the list: prefix, so remove all of those. Also, we now output the proper year (2000 instead of 00, for instance), so fix that in the test output. Finally, the time in the output for this test is formatted differently, for whatever reason, so change it to match the actual output. V-VMS-mix.out: Fix file sizes. File sizes on VMS can only be approximated. When the FTP tests initially landed in 2002, this was handled by not trying. Bug 22299 landed in 2003 and changed our behavior to approximate the size, but the tests were not updated. MozReview-Commit-ID: 1DVfBfHh82y
netwerk/test/gtest/parse-ftp/D-WinNT.in
netwerk/test/gtest/parse-ftp/D-WinNT.out
netwerk/test/gtest/parse-ftp/E-EPLF.out
netwerk/test/gtest/parse-ftp/U-WinNT.out
netwerk/test/gtest/parse-ftp/V-VMS-mix.out
--- a/netwerk/test/gtest/parse-ftp/D-WinNT.in
+++ b/netwerk/test/gtest/parse-ftp/D-WinNT.in
@@ -41,20 +41,22 @@ 09-05-00  10:35AM       <DIR>          N
 08-02-00  06:25PM       <DIR>          NLM
 09-06-00  03:04PM       <DIR>          PageOne
 06-27-00  06:00PM       <DIR>          pccomputing
 05-09-01  01:27PM       <DIR>          pictures
 07-21-00  04:23PM       <DIR>          pranks
 08-22-00  10:36AM       <DIR>          Sean
 08-10-00  01:54PM       <DIR>          SLeong
 09-07-00  05:46PM       <DIR>          svr
-07-21-00  07:22AM       <JUNCTION>     a_junction_sample
 10-23-00  01:27PM       <JUNCTION>     b_junction_sample => foo
 06-15-00  07:37AM       <JUNCTION>     c_junction_sample -> bar too
 07-14-00  01:35PM              2094926 canprankdesk.tif
 07-21-00  01:19PM                95077 Jon Kauffman Enjoys the Good Life.jpg
 07-21-00  01:19PM                52275 Name Plate.jpg
 07-14-00  01:38PM              2250540 Valentineoffprank-HiRes.jpg
+01-11-14  12:25AM             18864566 Bug961346
+10-10-2014  10:10AM       <DIR>        Bug1061898
+01-18-12  19:00             30724571 Bug1125816
 226 Transfer complete.
 ftp> close
 221  Thank-You For Using Microsoft Products!
 ftp> 
 
--- a/netwerk/test/gtest/parse-ftp/D-WinNT.out
+++ b/netwerk/test/gtest/parse-ftp/D-WinNT.out
@@ -33,15 +33,17 @@ 09-05-2000  10:35:00       <DIR>        
 08-02-2000  18:25:00       <DIR>          NLM
 09-06-2000  15:04:00       <DIR>          PageOne
 06-27-2000  18:00:00       <DIR>          pccomputing
 05-09-2001  13:27:00       <DIR>          pictures
 07-21-2000  16:23:00       <DIR>          pranks
 08-22-2000  10:36:00       <DIR>          Sean
 08-10-2000  13:54:00       <DIR>          SLeong
 09-07-2000  17:46:00       <DIR>          svr
-07-21-2000  07:22:00       <JUNCTION>     a_junction_sample
 10-23-2000  13:27:00       <JUNCTION>     b_junction_sample -> foo
 06-15-2000  07:37:00       <JUNCTION>     c_junction_sample -> bar too
 07-14-2000  13:35:00              2094926 canprankdesk.tif
 07-21-2000  13:19:00                95077 Jon Kauffman Enjoys the Good Life.jpg
 07-21-2000  13:19:00                52275 Name Plate.jpg
 07-14-2000  13:38:00              2250540 Valentineoffprank-HiRes.jpg
+01-11-2014  00:25:00             18864566 Bug961346
+10-10-2014  10:10:00       <DIR>          Bug1061898
+01-18-2012  19:00:00             30724571 Bug1125816
--- a/netwerk/test/gtest/parse-ftp/E-EPLF.out
+++ b/netwerk/test/gtest/parse-ftp/E-EPLF.out
@@ -1,8 +1,12 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
 01-11-2001  10:38:25       <DIR>          tmp
 02-29-2000  03:01:45       <DIR>          1998-100
 12-24-2000  21:44:06                 1172 mirrors.html
 02-29-2000  03:01:47       <DIR>          1999-275
 05-08-2000  07:25:16                  933 1999-275.html
 05-08-2000  07:27:06                  322 1998-401.html
 02-29-2000  03:01:47       <DIR>          1998-401
 02-29-2000  03:01:45       <DIR>          1997-275
--- a/netwerk/test/gtest/parse-ftp/U-WinNT.out
+++ b/netwerk/test/gtest/parse-ftp/U-WinNT.out
@@ -1,72 +1,54 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-cmnt: ftp> open ftp.microsoft.com
-cmnt: Microsoft FTP Service
-cmnt: Name (ftp.microsoft.com:cyp): 
-cmnt: 331 Anonymous access allowed, send identity (e-mail name) as password.
-cmnt: 230-This is FTP.Microsoft.Com
-cmnt: Anonymous user logged in.
-cmnt: Remote system type is Windows_NT.
-cmnt: ftp> quote dirstyle
-cmnt: MSDOS-like directory output is on
-cmnt: ftp> quote dirstyle
-cmnt: MSDOS-like directory output is off
-cmnt: ftp> ls
-cmnt: PORT command successful.
-cmnt: Opening ASCII mode data connection for /bin/ls.
-list: 02-25-00  00:00AM       <DIR>          channel
-list: 02-25-00  00:00AM       <DIR>          Education
-list: 02-25-00  00:00AM       <DIR>          enterprise
-list: 06-20-01  00:00AM       <DIR>          ISN
-list: 05-31-01  00:00AM       <DIR>          Museum
-list: 02-14-01  00:00AM       <DIR>          TechNet
-list: 10-24-01  00:00AM       <DIR>          whql
-list: 02-05-01  00:00AM       <DIR>          20Year
-list: 09-26-00  00:00AM       <DIR>          AccessFoxPro
-list: 12-21-00  00:00AM       <DIR>          AlbGrp
-list: 05-31-01  00:00AM       <DIR>          Alexandra
-list: 01-19-01  00:00AM       <DIR>          anna
-list: 04-06-00  00:00AM       <DIR>          anz
-list: 05-10-00  00:00AM       <DIR>          Chase Bobko2
-list: 03-29-00  00:00AM       <DIR>          cnn
-list: 11-21-00  00:00AM       <DIR>          Darin
-list: 03-09-00  00:00AM       <DIR>          digitalchicago
-list: 09-06-00  00:00AM       <DIR>          Dublin
-list: 01-30-01  00:00AM       <DIR>          eleanorf
-list: 04-26-01  00:00AM       <DIR>          girvin
-list: 04-26-00  00:00AM       <DIR>          Hires
-list: 08-15-00  00:00AM       <DIR>          HR
-list: 10-24-99  00:00AM              4368384 IMG00022.PCD
-list: 05-18-01  00:00AM       <DIR>          jacubowsky
-list: 10-12-00  00:00AM       <DIR>          JFalvey
-list: 03-28-01  00:00AM       <DIR>          johnci
-list: 07-14-00  00:00AM       <DIR>          Karin
-list: 09-07-00  00:00AM       <DIR>          Kjung
-list: 09-28-00  00:00AM       <DIR>          LarryE
-list: 08-17-00  00:00AM       <DIR>          Larson
-list: 09-12-00  00:00AM       <DIR>          marion
-list: 08-09-00  00:00AM       <DIR>          ms25
-list: 11-16-00  00:00AM       <DIR>          MS25Brochure
-list: 03-29-00  00:00AM       <DIR>          MShistory
-list: 09-05-00  00:00AM       <DIR>          Neils
-list: 08-02-00  00:00AM       <DIR>          NLM
-list: 09-06-00  00:00AM       <DIR>          PageOne
-list: 06-27-00  00:00AM       <DIR>          pccomputing
-list: 05-09-01  00:00AM       <DIR>          pictures
-list: 07-21-00  00:00AM       <DIR>          pranks
-list: 08-22-00  00:00AM       <DIR>          Sean
-list: 08-10-00  00:00AM       <DIR>          SLeong
-list: 09-07-00  00:00AM       <DIR>          svr
-list: 07-21-00  00:00AM       <DIR>          Transcontinental
-list: 10-23-00  00:00AM       <DIR>          veronist
-list: 06-15-00  00:00AM       <DIR>          zoe
-list: 07-14-00  00:00AM              2094926 canprankdesk.tif
-list: 07-21-00  00:00AM                95077 Jon Kauffman Enjoys the Good Life.jpg
-list: 07-21-00  00:00AM                52275 Name Plate.jpg
-list: 07-14-00  00:00AM              2250540 Valentineoffprank-HiRes.jpg
-junk: Transfer complete.
-junk: ftp> close
-junk:  Thank-You For Using Microsoft Products!
-junk: ftp> 
+02-25-2000  00:00:00       <DIR>          channel
+02-25-2000  00:00:00       <DIR>          Education
+02-25-2000  00:00:00       <DIR>          enterprise
+06-20-2001  00:00:00       <DIR>          ISN
+05-31-2001  00:00:00       <DIR>          Museum
+02-14-2001  00:00:00       <DIR>          TechNet
+10-24-2001  00:00:00       <DIR>          whql
+02-05-2001  00:00:00       <DIR>          20Year
+09-26-2000  00:00:00       <DIR>          AccessFoxPro
+12-21-2000  00:00:00       <DIR>          AlbGrp
+05-31-2001  00:00:00       <DIR>          Alexandra
+01-19-2001  00:00:00       <DIR>          anna
+04-06-2000  00:00:00       <DIR>          anz
+05-10-2000  00:00:00       <DIR>          Chase Bobko2
+03-29-2000  00:00:00       <DIR>          cnn
+11-21-2000  00:00:00       <DIR>          Darin
+03-09-2000  00:00:00       <DIR>          digitalchicago
+09-06-2000  00:00:00       <DIR>          Dublin
+01-30-2001  00:00:00       <DIR>          eleanorf
+04-26-2001  00:00:00       <DIR>          girvin
+04-26-2000  00:00:00       <DIR>          Hires
+08-15-2000  00:00:00       <DIR>          HR
+10-24-1999  00:00:00              4368384 IMG00022.PCD
+05-18-2001  00:00:00       <DIR>          jacubowsky
+10-12-2000  00:00:00       <DIR>          JFalvey
+03-28-2001  00:00:00       <DIR>          johnci
+07-14-2000  00:00:00       <DIR>          Karin
+09-07-2000  00:00:00       <DIR>          Kjung
+09-28-2000  00:00:00       <DIR>          LarryE
+08-17-2000  00:00:00       <DIR>          Larson
+09-12-2000  00:00:00       <DIR>          marion
+08-09-2000  00:00:00       <DIR>          ms25
+11-16-2000  00:00:00       <DIR>          MS25Brochure
+03-29-2000  00:00:00       <DIR>          MShistory
+09-05-2000  00:00:00       <DIR>          Neils
+08-02-2000  00:00:00       <DIR>          NLM
+09-06-2000  00:00:00       <DIR>          PageOne
+06-27-2000  00:00:00       <DIR>          pccomputing
+05-09-2001  00:00:00       <DIR>          pictures
+07-21-2000  00:00:00       <DIR>          pranks
+08-22-2000  00:00:00       <DIR>          Sean
+08-10-2000  00:00:00       <DIR>          SLeong
+09-07-2000  00:00:00       <DIR>          svr
+07-21-2000  00:00:00       <DIR>          Transcontinental
+10-23-2000  00:00:00       <DIR>          veronist
+06-15-2000  00:00:00       <DIR>          zoe
+07-14-2000  00:00:00              2094926 canprankdesk.tif
+07-21-2000  00:00:00                95077 Jon Kauffman Enjoys the Good Life.jpg
+07-21-2000  00:00:00                52275 Name Plate.jpg
+07-14-2000  00:00:00              2250540 Valentineoffprank-HiRes.jpg
--- a/netwerk/test/gtest/parse-ftp/V-VMS-mix.out
+++ b/netwerk/test/gtest/parse-ftp/V-VMS-mix.out
@@ -1,10 +1,10 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-11-04-1994  14:09:00                      LOGIN.COM
-01-29-1996  03:33:12                      CII-MANUAL.TEX
-01-29-1996  03:33:12                      THIS-IS-A-LONG-VMS-FILENAME.WITH-CR-TO-NEXT-LINE
-01-29-1996  03:33:00                      ANOTHER-LONG-VMS-FILENAME.WITH-LF-TO-NEXT-LINE
-03-05-1993  18:09:00                      CMU-VMS-IP-FTP-FILE
+11-04-1994  14:09:00                  512 LOGIN.COM
+01-29-1996  03:33:12               109056 CII-MANUAL.TEX
+01-29-1996  03:33:12               109056 THIS-IS-A-LONG-VMS-FILENAME.WITH-CR-TO-NEXT-LINE
+01-29-1996  03:33:00               109056 ANOTHER-LONG-VMS-FILENAME.WITH-LF-TO-NEXT-LINE
+03-05-1993  18:09:00                  512 CMU-VMS-IP-FTP-FILE
 03-05-1993  18:09:00        2199023255040 MAX_FILESIZE.FILE