summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/follow-symlinks.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/follow-symlinks.sh b/testsuite/follow-symlinks.sh
index 9066876..880a80e 100644
--- a/testsuite/follow-symlinks.sh
+++ b/testsuite/follow-symlinks.sh
@@ -52,9 +52,9 @@ sed --follow-symlinks -n 'F' la1 la2 > out-two-symlinks || fail=1
compare_ exp-two-symlinks out-two-symlinks || fail=1
# non-existing input with --follow-symlink
-# implementation note: lstat() will be called before open(), thus 'cannot stat'.
+# implementation note: readlink called before open, thus "couldn't readlink"
cat <<\EOF >exp-stat || framework_failure_
-sed: cannot stat badfile:
+sed: couldn't readlink badfile:
EOF
returns_ 4 sed --follow-symlinks 'F' badfile >/dev/null 2>err-stat || fail=1
@@ -69,4 +69,8 @@ echo "$PWD/a" > exp-la-abs || framework_failure_
sed -n --follow-symlinks 'F' la-abs > out-la-abs || fail=1
compare_ exp-la-abs out-la-abs || fail=1
+# symlink loop
+ln -s la-loop la-loop || framework_failure_
+sed --follow-symlinks -i s/a/b/ la-loop && fail=1
+
Exit $fail