Merge branch '3744_u7z_tests'

This commit is contained in:
Yury V. Zaytsev 2016-12-24 15:30:50 +04:00
commit 9f47eecc91
14 changed files with 281 additions and 1 deletions

View File

@ -19,6 +19,10 @@
P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` || P7ZIP=`which 7zr 2>/dev/null` || P7ZIP=""
# Let the test framework hook in:
P7ZIP=${MC_TEST_EXTFS_LIST_CMD:-$P7ZIP}
STAT=${MC_TEST_EXTFS_U7Z_STAT:-stat}
mcu7zip_list ()
{
# Symlinks are not shown - no idea how to distinguish them
@ -35,7 +39,7 @@ mcu7zip_list ()
zero_size=' 0'
# archive entries can have no datetime info, 7z will use archive file datetime
date_archive=`stat -c %y "$1" 2>/dev/null | sed -n "s/${date_re}.*/${date_mc}/p" 2>/dev/null`
date_archive=`$STAT -c %y "$1" 2>/dev/null | sed -n "s/${date_re}.*/${date_mc}/p" 2>/dev/null`
[ "${date_archive}"x = x ] && date_archive=`ls -lan "$1" 2>/dev/null | awk '{print $6, $7, $8}' 2>/dev/null`
[ "${date_archive}"x = x ] && date_archive="01-01-1970 00:00:00"

View File

@ -32,6 +32,18 @@ data_files_to_distribute = \
data/lslR.3.spaces-iso-noslash.input \
data/lslR.3.spaces-iso-noslash.output \
data/lslR.README \
data/u7z.README \
data/u7z.complex.env_vars \
data/u7z.complex.input \
data/u7z.complex.output \
data/u7z.missing-date.env_vars \
data/u7z.missing-date.input \
data/u7z.missing-date.output \
data/u7z.missing-size-and-date.env_vars \
data/u7z.missing-size-and-date.input \
data/u7z.missing-size-and-date.output \
data/u7z.simple.input \
data/u7z.simple.output \
data/urar.README \
data/urar.v4,v3.env_vars \
data/urar.v4,v3.input \

View File

@ -0,0 +1,26 @@
We have 4 inputs:
- u7z.simple.input
Simplest input: no abnormalities.
(One line has a filename with spaces in it.)
- u7z.missing-date.input
Date field is missing (see #2707).
- u7z.missing-size-and-date.input
Size field is missing, and in some rows the date is missing too (see #2707).
- u7z.complex.input
Downloaded from #2707. It's 'list.txt' plus three bottom lines from
'listing2.txt'. It demonstrates all the above: missing date, missing
uncompressed and compressed size.
Output files must be constant. Therefore in our '*.env_var' files we
define a command that sets missing dates to some fixed date (instead of
being the archive's date).

View File

@ -0,0 +1 @@
MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07"

View File

@ -0,0 +1,74 @@
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Listing archive: Geekbench-2.2.3-WindowsSetup.exe
--
Path = Geekbench-2.2.3-WindowsSetup.exe
Type = PE
CPU = x86
Characteristics = Executable 32-bit NoRelocs NoLineNums NoLocalSyms
Created = 2009-12-06 03:50:52
Physical Size = 5649208
Headers Size = 1024
Checksum = 5651922
Image Size = 327680
Section Alignment = 4096
File Alignment = 512
Code Size = 24064
Initialized Data Size = 164864
Uninitialized Data Size = 1024
Linker Version = 6.0
OS Version = 4.0
Image Version = 6.0
Subsystem Version = 4.0
Subsystem = Windows GUI
DLL Characteristics = TerminalServerAware
Stack Reserve = 1048576
Stack Commit = 4096
Heap Reserve = 1048576
Heap Commit = 4096
Image Base = 4194304
----
Path = [0]
Size = 5519272
Packed Size = 5519272
Offset = 123904
--
Path = [0]
Type = Nsis
Method = Deflate
Solid = -
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
..... 8005 $PLUGINSDIR/InstallOptions.dll
..... 3328 $PLUGINSDIR/StartMenu.dll
2007-11-15 01:12:38 ..... 134 $PLUGINSDIR/ioSpecial.ini
2003-09-24 00:34:00 ..... 1886 $PLUGINSDIR/modern-wizard.bmp
2011-11-03 02:33:04 ..... 1178084 Geekbench22.exe
2011-11-03 02:33:04 ..... 101652 geekbench.exe
2011-11-03 02:33:06 ..... 1058731 geekbench_x86_32.exe
2011-11-03 02:33:06 ..... 1192155 geekbench_x86_64.exe
2011-11-03 02:33:04 ..... 445814 cpuidsdk.dll
2011-11-03 02:33:04 ..... 469920 cpuidsdk64.dll
2011-11-03 02:33:04 ..... 737580 geekbench.plar
2011-11-03 02:23:16 ..... 4014 $_OUTDIR/html/ui/bg-repeat.gif
2011-11-03 02:23:16 ..... 12817 12817 $_OUTDIR/html/ui/callout-bg-bottom.gif
2011-11-03 02:23:16 ..... 14648 $_OUTDIR/html/ui/callout-bg-top.gif
2011-11-03 02:23:16 ..... 120 $_OUTDIR/html/ui/graph-background.png
2011-11-03 02:23:16 ..... 861 861 $_OUTDIR/html/ui/heading-bg-left.gif
2011-11-03 02:23:16 ..... 9854 $_OUTDIR/html/ui/heading-bg.gif
2011-11-03 02:23:16 ..... 30401 $_OUTDIR/html/ui/logo.gif
2011-11-03 02:23:16 ..... 1431 1431 $_OUTDIR/html/ui/nav-arrow-down.gif
2011-11-03 02:23:16 ..... 1446 1446 $_OUTDIR/html/ui/nav-arrow-up.gif
2011-11-03 02:23:16 ..... 1425 1425 $_OUTDIR/html/ui/nav-arrows-bg.gif
2011-11-03 02:23:16 ..... 3841 $_OUTDIR/html/ui/table-wrapper-bg-repeat-x.gif
2011-11-03 02:23:16 ..... 2885 2885 $_OUTDIR/html/ui/table-wrapper-bg-repeat.gif
2011-11-03 02:23:16 ..... 142162 142162 $_OUTDIR/ux/splash-screen.png
2006-08-11 23:49:28 ..... 28016 $PLUGINSDIR/splash.bmp
..... 6144 $PLUGINSDIR/AdvSplash.dll
..... plugins/shared memory/uninstall.exe
------------------- ----- ------------ ------------ ------------------------
163027 5423194 27 files, 0 folders

View File

@ -0,0 +1,27 @@
-rw-r--r-- 1 <<uid>> <<gid>> 469920 2011-11-03 02:33:04 cpuidsdk64.dll
-rw-r--r-- 1 <<uid>> <<gid>> 445814 2011-11-03 02:33:04 cpuidsdk.dll
-rw-r--r-- 1 <<uid>> <<gid>> 1178084 2011-11-03 02:33:04 Geekbench22.exe
-rw-r--r-- 1 <<uid>> <<gid>> 101652 2011-11-03 02:33:04 geekbench.exe
-rw-r--r-- 1 <<uid>> <<gid>> 737580 2011-11-03 02:33:04 geekbench.plar
-rw-r--r-- 1 <<uid>> <<gid>> 1058731 2011-11-03 02:33:06 geekbench_x86_32.exe
-rw-r--r-- 1 <<uid>> <<gid>> 1192155 2011-11-03 02:33:06 geekbench_x86_64.exe
-rw-r--r-- 1 <<uid>> <<gid>> 4014 2011-11-03 02:23:16 $_OUTDIR/html/ui/bg-repeat.gif
-rw-r--r-- 1 <<uid>> <<gid>> 12817 2011-11-03 02:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif
-rw-r--r-- 1 <<uid>> <<gid>> 14648 2011-11-03 02:23:16 $_OUTDIR/html/ui/callout-bg-top.gif
-rw-r--r-- 1 <<uid>> <<gid>> 120 2011-11-03 02:23:16 $_OUTDIR/html/ui/graph-background.png
-rw-r--r-- 1 <<uid>> <<gid>> 9854 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg.gif
-rw-r--r-- 1 <<uid>> <<gid>> 861 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg-left.gif
-rw-r--r-- 1 <<uid>> <<gid>> 30401 2011-11-03 02:23:16 $_OUTDIR/html/ui/logo.gif
-rw-r--r-- 1 <<uid>> <<gid>> 1431 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrow-down.gif
-rw-r--r-- 1 <<uid>> <<gid>> 1425 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrows-bg.gif
-rw-r--r-- 1 <<uid>> <<gid>> 1446 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrow-up.gif
-rw-r--r-- 1 <<uid>> <<gid>> 2885 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat.gif
-rw-r--r-- 1 <<uid>> <<gid>> 3841 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat-x.gif
-rw-r--r-- 1 <<uid>> <<gid>> 142162 2011-11-03 02:23:16 $_OUTDIR/ux/splash-screen.png
-rw-r--r-- 1 <<uid>> <<gid>> 6144 2007-07-07 07:07:07 $PLUGINSDIR/AdvSplash.dll
-rw-r--r-- 1 <<uid>> <<gid>> 8005 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll
-rw-r--r-- 1 <<uid>> <<gid>> 134 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini
-rw-r--r-- 1 <<uid>> <<gid>> 1886 2003-09-24 00:34:00 $PLUGINSDIR/modern-wizard.bmp
-rw-r--r-- 1 <<uid>> <<gid>> 28016 2006-08-11 23:49:28 $PLUGINSDIR/splash.bmp
-rw-r--r-- 1 <<uid>> <<gid>> 3328 2007-07-07 07:07:07 $PLUGINSDIR/StartMenu.dll
-rw-r--r-- 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 plugins/shared memory/uninstall.exe

View File

@ -0,0 +1 @@
MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07"

View File

@ -0,0 +1,5 @@
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
D.... 0 0 $PLUGINSDIR
..... 11024 8005 $PLUGINSDIR/InstallOptions.dll
2007-11-15 01:12:38 ..... 235 134 $PLUGINSDIR/ioSpecial.ini

View File

@ -0,0 +1,3 @@
drwxr-xr-x 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 $PLUGINSDIR
-rw-r--r-- 1 <<uid>> <<gid>> 11024 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll
-rw-r--r-- 1 <<uid>> <<gid>> 235 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini

View File

@ -0,0 +1 @@
MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07"

View File

@ -0,0 +1,11 @@
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2011-11-01 01:33:04 ..... 469920 cpuidsdk64.dll
2011-11-02 02:23:16 D.... 0 $_OUTDIR/html/ui
2011-11-03 03:33:04 ..... test.dll
2011-11-04 04:23:16 D.... test
..... 17770090 no-date-cpuidsdk64.dll
D.... 0 no-date-$_OUTDIR/html/ui
..... no-date-test.dll
D.... no-date-test
2011-11-05 05:23:16 ..... 17897 12817 $_OUTDIR/html/ui/callout-bg-bottom.gif

View File

@ -0,0 +1,9 @@
-rw-r--r-- 1 <<uid>> <<gid>> 469920 2011-11-01 01:33:04 cpuidsdk64.dll
-rw-r--r-- 1 <<uid>> <<gid>> 17770090 2007-07-07 07:07:07 no-date-cpuidsdk64.dll
drwxr-xr-x 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 no-date-$_OUTDIR/html/ui
drwxr-xr-x 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 no-date-test
-rw-r--r-- 1 <<uid>> <<gid>> 0 2007-07-07 07:07:07 no-date-test.dll
drwxr-xr-x 1 <<uid>> <<gid>> 0 2011-11-02 02:23:16 $_OUTDIR/html/ui
-rw-r--r-- 1 <<uid>> <<gid>> 17897 2011-11-05 05:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif
drwxr-xr-x 1 <<uid>> <<gid>> 0 2011-11-04 04:23:16 test
-rw-r--r-- 1 <<uid>> <<gid>> 0 2011-11-03 03:33:04 test.dll

View File

@ -0,0 +1,64 @@
7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_GB.utf8,Utf16=on,HugeFiles=on,32 bits,1 CPU Intel(R) Pentium(R) 4 CPU 1.80GHz (F27),ASM)
Scanning the drive for archives:
1 file, 7597 bytes (8 KiB)
Listing archive: all.7z
--
Path = all.7z
Type = 7z
Physical Size = 7597
Headers Size = 882
Method = LZMA2:24k
Solid = +
Blocks = 1
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2016-10-26 08:35:48 D.... 0 0 x
2009-05-03 21:01:33 D.... 0 0 x/etc
2009-05-03 21:02:13 D.... 0 0 x/etc/X11
2006-05-02 10:12:38 D.... 0 0 x/etc/X11/xinit
2005-09-24 02:11:27 D.... 0 0 x/etc/X11/xinit/Xclients.d
2005-12-04 19:15:47 D.... 0 0 x/etc/X11/xinit/xinitrc.d
2009-05-03 21:07:38 D.... 0 0 x/etc/X11/xkb
2016-12-18 22:30:42 ....A 0 0 with spaces.txt
2002-08-01 23:21:47 ....A 143 6715 alert
2004-05-19 20:42:38 ....A 363 atime
2005-11-09 01:36:31 ....A 71 fv
2003-10-18 20:37:07 ....A 59 fvd
2006-10-22 22:26:05 ....A 83 magdev
2006-10-19 16:56:16 ....A 72 maghelp
2004-03-14 12:25:27 ....A 37 ml
2004-07-06 18:02:03 ....A 28 modernize
2004-04-02 03:05:30 ....A 138 pxml
2004-12-08 20:42:44 ....A 725 s
2002-07-29 11:58:15 ....A 803 ser
2004-08-04 14:29:00 ....A 40 title
2002-08-01 23:21:41 ....A 156 ualert
2004-06-28 16:49:03 ....A 17 ucopy
2004-06-28 16:49:10 ....A 18 upaste
2003-08-25 19:08:11 ....A 2146 utf8_to_cp1255.perl
2006-05-16 21:00:06 ....A 63 utf8_to_cp1255.sh
2003-08-11 17:40:25 ....A 846 vimspell.sh
2002-03-28 01:20:12 ....A 819 vimspell.txt
2005-11-14 04:41:01 ....A 233 vp
2010-01-31 23:04:48 ....A 340 x/.xsession
2005-09-24 02:11:27 ....A 1856 x/etc/X11/xinit/Xclients
2005-09-24 02:11:27 ....A 1270 x/etc/X11/xinit/xinitrc
2005-09-24 02:11:27 ....A 2161 x/etc/X11/xinit/xinitrc-common
2005-09-24 02:11:27 ....A 1579 x/etc/X11/xinit/xinitrc.d/xinput.sh
2005-09-02 17:36:13 ....A 81 x/etc/X11/xinit/xinitrc.d/xmbind.sh
2009-05-03 21:07:38 ....A 71 x/etc/X11/xkb/note.txt
2003-08-03 01:46:40 ....A 489 x/setxkb
2003-03-09 14:08:01 ....A 142 x/setxkb2
2002-11-08 13:28:37 ....A 158 x/x
2006-12-07 11:30:57 ....A 3746 x/xinitrc
2006-12-07 11:28:18 ....A 42 x/xs
2003-02-17 15:11:46 ....A 58 xcopy
2003-02-17 15:10:46 ....A 58 xpaste
------------------- ----- ------------ ------------ ------------------------
2016-12-18 22:30:42 18911 6715 35 files, 7 folders

View File

@ -0,0 +1,42 @@
-rw-r--r-- 1 <<uid>> <<gid>> 143 2002-08-01 23:21:47 alert
-rw-r--r-- 1 <<uid>> <<gid>> 363 2004-05-19 20:42:38 atime
-rw-r--r-- 1 <<uid>> <<gid>> 71 2005-11-09 01:36:31 fv
-rw-r--r-- 1 <<uid>> <<gid>> 59 2003-10-18 20:37:07 fvd
-rw-r--r-- 1 <<uid>> <<gid>> 83 2006-10-22 22:26:05 magdev
-rw-r--r-- 1 <<uid>> <<gid>> 72 2006-10-19 16:56:16 maghelp
-rw-r--r-- 1 <<uid>> <<gid>> 37 2004-03-14 12:25:27 ml
-rw-r--r-- 1 <<uid>> <<gid>> 28 2004-07-06 18:02:03 modernize
-rw-r--r-- 1 <<uid>> <<gid>> 138 2004-04-02 03:05:30 pxml
-rw-r--r-- 1 <<uid>> <<gid>> 725 2004-12-08 20:42:44 s
-rw-r--r-- 1 <<uid>> <<gid>> 803 2002-07-29 11:58:15 ser
-rw-r--r-- 1 <<uid>> <<gid>> 40 2004-08-04 14:29:00 title
-rw-r--r-- 1 <<uid>> <<gid>> 156 2002-08-01 23:21:41 ualert
-rw-r--r-- 1 <<uid>> <<gid>> 17 2004-06-28 16:49:03 ucopy
-rw-r--r-- 1 <<uid>> <<gid>> 18 2004-06-28 16:49:10 upaste
-rw-r--r-- 1 <<uid>> <<gid>> 2146 2003-08-25 19:08:11 utf8_to_cp1255.perl
-rw-r--r-- 1 <<uid>> <<gid>> 63 2006-05-16 21:00:06 utf8_to_cp1255.sh
-rw-r--r-- 1 <<uid>> <<gid>> 846 2003-08-11 17:40:25 vimspell.sh
-rw-r--r-- 1 <<uid>> <<gid>> 819 2002-03-28 01:20:12 vimspell.txt
-rw-r--r-- 1 <<uid>> <<gid>> 233 2005-11-14 04:41:01 vp
-rw-r--r-- 1 <<uid>> <<gid>> 0 2016-12-18 22:30:42 with spaces.txt
drwxr-xr-x 1 <<uid>> <<gid>> 0 2016-10-26 08:35:48 x
-rw-r--r-- 1 <<uid>> <<gid>> 58 2003-02-17 15:11:46 xcopy
drwxr-xr-x 1 <<uid>> <<gid>> 0 2009-05-03 21:01:33 x/etc
drwxr-xr-x 1 <<uid>> <<gid>> 0 2009-05-03 21:02:13 x/etc/X11
drwxr-xr-x 1 <<uid>> <<gid>> 0 2006-05-02 10:12:38 x/etc/X11/xinit
-rw-r--r-- 1 <<uid>> <<gid>> 1856 2005-09-24 02:11:27 x/etc/X11/xinit/Xclients
drwxr-xr-x 1 <<uid>> <<gid>> 0 2005-09-24 02:11:27 x/etc/X11/xinit/Xclients.d
-rw-r--r-- 1 <<uid>> <<gid>> 1270 2005-09-24 02:11:27 x/etc/X11/xinit/xinitrc
-rw-r--r-- 1 <<uid>> <<gid>> 2161 2005-09-24 02:11:27 x/etc/X11/xinit/xinitrc-common
drwxr-xr-x 1 <<uid>> <<gid>> 0 2005-12-04 19:15:47 x/etc/X11/xinit/xinitrc.d
-rw-r--r-- 1 <<uid>> <<gid>> 1579 2005-09-24 02:11:27 x/etc/X11/xinit/xinitrc.d/xinput.sh
-rw-r--r-- 1 <<uid>> <<gid>> 81 2005-09-02 17:36:13 x/etc/X11/xinit/xinitrc.d/xmbind.sh
drwxr-xr-x 1 <<uid>> <<gid>> 0 2009-05-03 21:07:38 x/etc/X11/xkb
-rw-r--r-- 1 <<uid>> <<gid>> 71 2009-05-03 21:07:38 x/etc/X11/xkb/note.txt
-rw-r--r-- 1 <<uid>> <<gid>> 58 2003-02-17 15:10:46 xpaste
-rw-r--r-- 1 <<uid>> <<gid>> 489 2003-08-03 01:46:40 x/setxkb
-rw-r--r-- 1 <<uid>> <<gid>> 142 2003-03-09 14:08:01 x/setxkb2
-rw-r--r-- 1 <<uid>> <<gid>> 158 2002-11-08 13:28:37 x/x
-rw-r--r-- 1 <<uid>> <<gid>> 3746 2006-12-07 11:30:57 x/xinitrc
-rw-r--r-- 1 <<uid>> <<gid>> 42 2006-12-07 11:28:18 x/xs
-rw-r--r-- 1 <<uid>> <<gid>> 340 2010-01-31 23:04:48 x/.xsession