From db8d16a060b76b6382daa4365d2d2ad5902cc735 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 21 Mar 2020 19:04:09 +0000 Subject: 45583/0005: Add a test for bin_whence's symlinks resolution. --- ChangeLog | 3 +++ Test/B13whence.ztst | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 Test/B13whence.ztst diff --git a/ChangeLog b/ChangeLog index 3083552c3..58296c0df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2020-03-25 Daniel Shahaf + * 45583/0005: Test/B13whence.ztst: Add a test for bin_whence's + symlinks resolution. + * 45583/0004: Etc/BUGS, Src/utils.c, Test/D02glob.ztst: Fix segfault on resolving symlink loops diff --git a/Test/B13whence.ztst b/Test/B13whence.ztst new file mode 100644 index 000000000..b22363980 --- /dev/null +++ b/Test/B13whence.ztst @@ -0,0 +1,22 @@ +%prep + + mkdir whence.tmp + pushd whence.tmp + ln -s real step3 + ln -s step3 step2 + ln -s step2 step1 + touch real + chmod +x real + prefix=$PWD + popd + +%test + + ( + path=( $PWD/whence.tmp $path ) + whence -S step1 + whence -s step1 + ) +0q:whence symlink resolution +>$prefix/step1 -> $prefix/step2 -> $prefix/step3 -> $prefix/real +>$prefix/step1 -> $prefix/real -- cgit 1.4.1