Ticket #3730: 3730-0011-extfs-lslR-add-tests.patch

File 3730-0011-extfs-lslR-add-tests.patch, 8.6 KB (added by mooffie, 8 years ago)
  • tests/src/extfs-helpers-listcmd/Makefile.am

    From 9be005282085687cb1fab67bf8237cd51da59d0b Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Wed, 23 Nov 2016 10:53:47 +0200
    Subject: [PATCH 11/11] extfs: lslR: add tests.
    
    ---
     tests/src/extfs-helpers-listcmd/Makefile.am        | 10 +++++++++
     .../extfs-helpers-listcmd/data/lslR.1.spaces.args  |  1 +
     .../extfs-helpers-listcmd/data/lslR.1.spaces.input | 23 +++++++++++++++++++
     .../data/lslR.1.spaces.output                      |  9 ++++++++
     .../data/lslR.2.spaces-iso.args                    |  1 +
     .../data/lslR.2.spaces-iso.input                   | 23 +++++++++++++++++++
     .../data/lslR.2.spaces-iso.output                  |  9 ++++++++
     .../data/lslR.3.spaces-iso-noslash.args            |  1 +
     .../data/lslR.3.spaces-iso-noslash.input           | 17 ++++++++++++++
     .../data/lslR.3.spaces-iso-noslash.output          |  6 +++++
     tests/src/extfs-helpers-listcmd/data/lslR.README   | 26 ++++++++++++++++++++++
     11 files changed, 126 insertions(+)
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.args
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.input
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.output
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.args
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.input
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.output
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.args
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.input
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.output
     create mode 100644 tests/src/extfs-helpers-listcmd/data/lslR.README
    
    diff --git a/tests/src/extfs-helpers-listcmd/Makefile.am b/tests/src/extfs-helpers-listcmd/Makefile.am
    index aec7d0a..5712646 100644
    a b mc_parse_ls_l_SOURCES = \ 
    2222        mc_parse_ls_l.c 
    2323 
    2424data_files_to_distribute = \ 
     25        data/lslR.1.spaces.args \ 
     26        data/lslR.1.spaces.input \ 
     27        data/lslR.1.spaces.output \ 
     28        data/lslR.2.spaces-iso.args \ 
     29        data/lslR.2.spaces-iso.input \ 
     30        data/lslR.2.spaces-iso.output \ 
     31        data/lslR.3.spaces-iso-noslash.args \ 
     32        data/lslR.3.spaces-iso-noslash.input \ 
     33        data/lslR.3.spaces-iso-noslash.output \ 
     34        data/lslR.README \ 
    2535        data/urar.README \ 
    2636        data/urar.v4,v3.env_vars \ 
    2737        data/urar.v4,v3.input \ 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.args

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.args b/tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.args
    new file mode 100644
    index 0000000..2308cee
    - +  
     1--drop-ids --drop-mtime 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.input

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.input b/tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.input
    new file mode 100644
    index 0000000..908077a
    - +  
     1.: 
     2total 12 
     3drwxr-xr-x 3 serhiy serhiy 4096 Dec 29 19:12  1 2 
     4drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:08 1 2 
     5drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 1 2  
     6 
     7./ 1 2: 
     8total 4 
     9-rw-r--r-- 1 serhiy serhiy    0 Dec 29 19:08 b 
     10drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 z 
     11 
     12./ 1 2/z: 
     13total 0 
     14 
     15./1 2: 
     16total 0 
     17-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 a 
     18 
     19./1 2 : 
     20total 0 
     21-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09  d 
     22-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 c 
     23-rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 x: 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.output

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.output b/tests/src/extfs-helpers-listcmd/data/lslR.1.spaces.output
    new file mode 100644
    index 0000000..dd6e5f1
    - +  
     1drwxr-xr-x   3       4096 ./ 1 2 
     2drwxr-xr-x   2       4096 ./1 2 
     3drwxr-xr-x   2       4096 ./1 2  
     4-rw-r--r--   1          0 ./ 1 2/b 
     5drwxr-xr-x   2       4096 ./ 1 2/z 
     6-rw-r--r--   1          0 ./1 2/a 
     7-rw-r--r--   1          0 ./1 2 / d 
     8-rw-r--r--   1          0 ./1 2 /c 
     9-rw-r--r--   1          0 ./1 2 /x: 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.args

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.args b/tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.args
    new file mode 100644
    index 0000000..9f52292
    - +  
     1--drop-ids 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.input

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.input b/tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.input
    new file mode 100644
    index 0000000..569586d
    - +  
     1.: 
     2total 12 
     3drwxr-xr-x 3 serhiy serhiy 4096 2009-12-29 19:12  1 2 
     4drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:08 1 2 
     5drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 1 2  
     6 
     7./ 1 2: 
     8total 4 
     9-rw-r--r-- 1 serhiy serhiy    0 2009-12-29 19:08 b 
     10drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z 
     11 
     12./ 1 2/z: 
     13total 0 
     14 
     15./1 2: 
     16total 0 
     17-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a 
     18 
     19./1 2 : 
     20total 0 
     21-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c 
     22-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09  d 
     23-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x: 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.output

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.output b/tests/src/extfs-helpers-listcmd/data/lslR.2.spaces-iso.output
    new file mode 100644
    index 0000000..60f0bdd
    - +  
     1drwxr-xr-x   3       4096 2009-12-29 19:12:00 ./ 1 2 
     2drwxr-xr-x   2       4096 2009-12-29 19:08:00 ./1 2 
     3drwxr-xr-x   2       4096 2009-12-29 19:12:00 ./1 2  
     4-rw-r--r--   1          0 2009-12-29 19:08:00 ./ 1 2/b 
     5drwxr-xr-x   2       4096 2009-12-29 19:12:00 ./ 1 2/z 
     6-rw-r--r--   1          0 2009-12-29 19:08:00 ./1 2/a 
     7-rw-r--r--   1          0 2009-12-29 19:08:00 ./1 2 /c 
     8-rw-r--r--   1          0 2009-12-29 19:09:00 ./1 2 / d 
     9-rw-r--r--   1          0 2009-12-29 19:09:00 ./1 2 /x: 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.args

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.args b/tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.args
    new file mode 100644
    index 0000000..9f52292
    - +  
     1--drop-ids 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.input

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.input b/tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.input
    new file mode 100644
    index 0000000..28e5c22
    - +  
     1 1 2: 
     2total 4 
     3-rw-r--r-- 1 serhiy serhiy    0 2009-12-29 19:08 b 
     4drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z 
     5 
     6 1 2/z: 
     7total 0 
     8 
     91 2: 
     10total 0 
     11-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a 
     12 
     131 2 : 
     14total 0 
     15-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c 
     16-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09  d 
     17-rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x: 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.output

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.output b/tests/src/extfs-helpers-listcmd/data/lslR.3.spaces-iso-noslash.output
    new file mode 100644
    index 0000000..d32336e
    - +  
     1-rw-r--r--   1          0 2009-12-29 19:08:00 ./ 1 2/b 
     2drwxr-xr-x   2       4096 2009-12-29 19:12:00 ./ 1 2/z 
     3-rw-r--r--   1          0 2009-12-29 19:08:00 1 2/a 
     4-rw-r--r--   1          0 2009-12-29 19:08:00 1 2 /c 
     5-rw-r--r--   1          0 2009-12-29 19:09:00 1 2 / d 
     6-rw-r--r--   1          0 2009-12-29 19:09:00 1 2 /x: 
  • new file tests/src/extfs-helpers-listcmd/data/lslR.README

    diff --git a/tests/src/extfs-helpers-listcmd/data/lslR.README b/tests/src/extfs-helpers-listcmd/data/lslR.README
    new file mode 100644
    index 0000000..7f01b73
    - +  
     1 
     2The inputs were taken from: 
     3 
     4    http://www.midnight-commander.org/ticket/1921 
     5 
     6These inputs are supposed to cover: 
     7 
     8- "spaces": spaces in dir/file names. 
     9 
     10- "iso": ISO date. The ticket claims this is enabled in en_US.UTF-8 
     11  locale, but that's untrue. Nevertheless, it's a useful format (the 
     12  default 'ls' dates are relative and therefore somewhat useless in lslR 
     13  files) so we don't mind covering it here. 
     14 
     15- "noshalsh": directories not starting with "./". 
     16 
     17Argument files: 
     18 
     19The output produced must be constant anytime. Therefore: 
     20 
     21- For the one input using non-ISO date we must use --drop-mtime. 
     22  Otherwise, because these are relative dates, next year the output 
     23  will show a different year. 
     24 
     25- For all inputs we use --drop-ids for the case we have user "serhiy" on 
     26  our system (and we aren't running as that user).