extfs: lslR: add tests.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Mooffie 2016-11-23 10:53:47 +02:00 committed by Andrew Borodin
parent f2c8479a50
commit 96313b16bc
11 changed files with 126 additions and 0 deletions

View File

@ -22,6 +22,16 @@ mc_parse_ls_l_SOURCES = \
mc_parse_ls_l.c
data_files_to_distribute = \
data/lslR.1.spaces.args \
data/lslR.1.spaces.input \
data/lslR.1.spaces.output \
data/lslR.2.spaces-iso.args \
data/lslR.2.spaces-iso.input \
data/lslR.2.spaces-iso.output \
data/lslR.3.spaces-iso-noslash.args \
data/lslR.3.spaces-iso-noslash.input \
data/lslR.3.spaces-iso-noslash.output \
data/lslR.README \
data/urar.README \
data/urar.v4,v3.env_vars \
data/urar.v4,v3.input \

View File

@ -0,0 +1 @@
--drop-ids --drop-mtime

View File

@ -0,0 +1,23 @@
.:
total 12
drwxr-xr-x 3 serhiy serhiy 4096 Dec 29 19:12 1 2
drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:08 1 2
drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 1 2
./ 1 2:
total 4
-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 b
drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 z
./ 1 2/z:
total 0
./1 2:
total 0
-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 a
./1 2 :
total 0
-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 d
-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 c
-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 x:

View File

@ -0,0 +1,9 @@
drwxr-xr-x 3 4096 ./ 1 2
drwxr-xr-x 2 4096 ./1 2
drwxr-xr-x 2 4096 ./1 2
-rw-r--r-- 1 0 ./ 1 2/b
drwxr-xr-x 2 4096 ./ 1 2/z
-rw-r--r-- 1 0 ./1 2/a
-rw-r--r-- 1 0 ./1 2 / d
-rw-r--r-- 1 0 ./1 2 /c
-rw-r--r-- 1 0 ./1 2 /x:

View File

@ -0,0 +1 @@
--drop-ids

View File

@ -0,0 +1,23 @@
.:
total 12
drwxr-xr-x 3 serhiy serhiy 4096 2009-12-29 19:12 1 2
drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:08 1 2
drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 1 2
./ 1 2:
total 4
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 b
drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z
./ 1 2/z:
total 0
./1 2:
total 0
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a
./1 2 :
total 0
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 d
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x:

View File

@ -0,0 +1,9 @@
drwxr-xr-x 3 4096 2009-12-29 19:12:00 ./ 1 2
drwxr-xr-x 2 4096 2009-12-29 19:08:00 ./1 2
drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./1 2
-rw-r--r-- 1 0 2009-12-29 19:08:00 ./ 1 2/b
drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./ 1 2/z
-rw-r--r-- 1 0 2009-12-29 19:08:00 ./1 2/a
-rw-r--r-- 1 0 2009-12-29 19:08:00 ./1 2 /c
-rw-r--r-- 1 0 2009-12-29 19:09:00 ./1 2 / d
-rw-r--r-- 1 0 2009-12-29 19:09:00 ./1 2 /x:

View File

@ -0,0 +1 @@
--drop-ids

View File

@ -0,0 +1,17 @@
1 2:
total 4
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 b
drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z
1 2/z:
total 0
1 2:
total 0
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a
1 2 :
total 0
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 d
-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x:

View File

@ -0,0 +1,6 @@
-rw-r--r-- 1 0 2009-12-29 19:08:00 ./ 1 2/b
drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./ 1 2/z
-rw-r--r-- 1 0 2009-12-29 19:08:00 1 2/a
-rw-r--r-- 1 0 2009-12-29 19:08:00 1 2 /c
-rw-r--r-- 1 0 2009-12-29 19:09:00 1 2 / d
-rw-r--r-- 1 0 2009-12-29 19:09:00 1 2 /x:

View File

@ -0,0 +1,26 @@
The inputs were taken from:
http://www.midnight-commander.org/ticket/1921
These inputs are supposed to cover:
- "spaces": spaces in dir/file names.
- "iso": ISO date. The ticket claims this is enabled in en_US.UTF-8
locale, but that's untrue. Nevertheless, it's a useful format (the
default 'ls' dates are relative and therefore somewhat useless in lslR
files) so we don't mind covering it here.
- "noshalsh": directories not starting with "./".
Argument files:
The output produced must be constant anytime. Therefore:
- For the one input using non-ISO date we must use --drop-mtime.
Otherwise, because these are relative dates, next year the output
will show a different year.
- For all inputs we use --drop-ids for the case we have user "serhiy" on
our system (and we aren't running as that user).