]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rename: tests: add more symlink checks
authorMauricio Faria de Oliveira <mfo@canonical.com>
Tue, 14 Jul 2020 18:49:25 +0000 (15:49 -0300)
committerMauricio Faria de Oliveira <mfo@canonical.com>
Tue, 14 Jul 2020 18:51:47 +0000 (15:51 -0300)
commitff84ba8b03e9381bc79bac7098cc4051a31587ad
treead3b430a49ec043ddae556fdc2e86a11836acb14
parent70dae020c984d81c3247d7fd73b8c61bbfc519a4
rename: tests: add more symlink checks

Add a few checks to the symlink test, including for the fix
in commit 477239ce0d60 ("rename: fix regression for symlink
with non-existing target").

Tested with './tests/run.sh rename/symlink' before/after that
commit with FAILED/OK results (and '--show-diff') as expected:

After:
       rename: symlink check                  ... OK

Before:
       rename: symlink check                  ... FAILED (rename/symlink)

With --show-diff:

    diff-{{{
    --- /home/mfo/git/util-linux/tests/expected/rename/symlink 2020-07-14 15:21:06.412792160 -0300
    +++ /home/mfo/git/util-linux/tests/output/rename/symlink 2020-07-14 15:45:10.980927233 -0300
    @@ -3,5 +3,3 @@
     rename_slink.3: `old' -> `new'
     `rename_slink.1' -> `rename_symlink.1'
     target
    -`rename_slink.2' -> `rename_symlink.2'
    -target
    }}}-diff

    diff-{{{
    --- /home/mfo/git/util-linux/tests/expected/rename/symlink.err 2020-07-14 15:37:42.466207786 -0300
    +++ /home/mfo/git/util-linux/tests/output/rename/symlink.err 2020-07-14 15:45:10.984927251 -0300
    @@ -1 +1,2 @@
    +rename: rename_slink.2: not accessible: No such file or directory
     rename: rename_slink.3: No such file or directory
    }}}-diff

Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
tests/expected/rename/symlink
tests/expected/rename/symlink.err [new file with mode: 0644]
tests/ts/rename/symlink