From 80eec18020f531abbdb2abbb919ab6c6fa34107c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 Sep 2017 22:05:04 -0400 Subject: tests: Test hardlinks to symlinks --- tests.sh | 2 ++ tests/test_H_samefile_broken.out | 1 + tests/test_L.out | 2 ++ tests/test_L_depth.out | 2 ++ tests/test_L_xtype_l.out | 2 ++ tests/test_colors.out | 2 ++ tests/test_follow.out | 2 ++ tests/test_printf_types.out | 2 ++ tests/test_samefile_broken.out | 1 + tests/test_samefile_symlink.out | 1 + tests/test_xtype_f.out | 1 + tests/test_xtype_l.out | 1 + tests/test_xtype_multi.out | 1 + 13 files changed, 20 insertions(+) diff --git a/tests.sh b/tests.sh index 5729bb7..620bc2a 100755 --- a/tests.sh +++ b/tests.sh @@ -75,7 +75,9 @@ function make_links() { touchp "$1/file" ln -s file "$1/symlink" ln "$1/file" "$1/hardlink" + ln -P "$1/symlink" "$1/hardsymlink" ln -s nowhere "$1/broken" + ln -P "$1/broken" "$1/hardbroken" ln -s symlink/file "$1/notdir" ln -s loop "$1/loop" mkdir -p "$1/deeply/nested/dir" diff --git a/tests/test_H_samefile_broken.out b/tests/test_H_samefile_broken.out index 21d6316..01a6f1e 100644 --- a/tests/test_H_samefile_broken.out +++ b/tests/test_H_samefile_broken.out @@ -1 +1,2 @@ links/broken +links/hardbroken diff --git a/tests/test_L.out b/tests/test_L.out index dc88380..d96be2a 100644 --- a/tests/test_L.out +++ b/tests/test_L.out @@ -2,7 +2,9 @@ links links/broken links/deeply links/file +links/hardbroken links/hardlink +links/hardsymlink links/notdir links/skip links/symlink diff --git a/tests/test_L_depth.out b/tests/test_L_depth.out index dc88380..d96be2a 100644 --- a/tests/test_L_depth.out +++ b/tests/test_L_depth.out @@ -2,7 +2,9 @@ links links/broken links/deeply links/file +links/hardbroken links/hardlink +links/hardsymlink links/notdir links/skip links/symlink diff --git a/tests/test_L_xtype_l.out b/tests/test_L_xtype_l.out index 5773878..bfb5bec 100644 --- a/tests/test_L_xtype_l.out +++ b/tests/test_L_xtype_l.out @@ -1,4 +1,6 @@ links/broken +links/hardbroken +links/hardsymlink links/notdir links/skip links/symlink diff --git a/tests/test_colors.out b/tests/test_colors.out index 6f8c534..6ff097f 100644 --- a/tests/test_colors.out +++ b/tests/test_colors.out @@ -1,8 +1,10 @@ links links/deeply +links/hardsymlink links/skip links/symlink links/broken +links/hardbroken links/loop links/notdir links/file diff --git a/tests/test_follow.out b/tests/test_follow.out index dc88380..d96be2a 100644 --- a/tests/test_follow.out +++ b/tests/test_follow.out @@ -2,7 +2,9 @@ links links/broken links/deeply links/file +links/hardbroken links/hardlink +links/hardsymlink links/notdir links/skip links/symlink diff --git a/tests/test_printf_types.out b/tests/test_printf_types.out index b548b10..4b19b34 100644 --- a/tests/test_printf_types.out +++ b/tests/test_printf_types.out @@ -2,7 +2,9 @@ (links/broken) (nowhere) l N (links/deeply) () d d (links/file) () f f +(links/hardbroken) (nowhere) l N (links/hardlink) () f f +(links/hardsymlink) (file) l f (links/loop) (loop) l L (links/symlink) (file) l f (links/deeply/nested) () d d diff --git a/tests/test_samefile_broken.out b/tests/test_samefile_broken.out index 21d6316..01a6f1e 100644 --- a/tests/test_samefile_broken.out +++ b/tests/test_samefile_broken.out @@ -1 +1,2 @@ links/broken +links/hardbroken diff --git a/tests/test_samefile_symlink.out b/tests/test_samefile_symlink.out index 299a572..08eb8ab 100644 --- a/tests/test_samefile_symlink.out +++ b/tests/test_samefile_symlink.out @@ -1 +1,2 @@ +links/hardsymlink links/symlink diff --git a/tests/test_xtype_f.out b/tests/test_xtype_f.out index 222ac78..35460e6 100644 --- a/tests/test_xtype_f.out +++ b/tests/test_xtype_f.out @@ -1,3 +1,4 @@ links/file links/hardlink +links/hardsymlink links/symlink diff --git a/tests/test_xtype_l.out b/tests/test_xtype_l.out index 8b0a404..7c2bb3a 100644 --- a/tests/test_xtype_l.out +++ b/tests/test_xtype_l.out @@ -1,2 +1,3 @@ links/broken +links/hardbroken links/notdir diff --git a/tests/test_xtype_multi.out b/tests/test_xtype_multi.out index f9847db..ce52e19 100644 --- a/tests/test_xtype_multi.out +++ b/tests/test_xtype_multi.out @@ -2,6 +2,7 @@ links links/deeply links/file links/hardlink +links/hardsymlink links/skip links/symlink links/deeply/nested -- cgit v1.2.3