summaryrefslogtreecommitdiff
path: root/tests/ln/hard-to-sym.sh
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:17:09 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:17:09 +0300
commitcc78bdc31749e9754120ae5a9d4849f4832b40a4 (patch)
tree4f9e3f2064e56651ed8d41ae9d8ce8b08fc5241b /tests/ln/hard-to-sym.sh
parent8425beb209e6fedf50bcdd934ced14dfa0d7b596 (diff)
parent71cd8e3a743046573744123777061b64881bf372 (diff)
downloadcoreutils-cc78bdc31749e9754120ae5a9d4849f4832b40a4.tar.gz
Merge tag 'upstream/8.24'
Upstream version 8.24 Conflicts: INSTALL Makefile.in aclocal.m4 build-aux/config.guess build-aux/config.rpath build-aux/config.sub build-aux/depcomp build-aux/missing build-aux/test-driver build-aux/texinfo.tex doc/coreutils.info doc/stamp-vti doc/version.texi gnulib-tests/Makefile.in po/Makefile.in.in
Diffstat (limited to 'tests/ln/hard-to-sym.sh')
-rwxr-xr-xtests/ln/hard-to-sym.sh38
1 files changed, 22 insertions, 16 deletions
diff --git a/tests/ln/hard-to-sym.sh b/tests/ln/hard-to-sym.sh
index 995d3cf6..edcee660 100755
--- a/tests/ln/hard-to-sym.sh
+++ b/tests/ln/hard-to-sym.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Tests for ln -L/-P.
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,24 +29,30 @@ ln -s -L -P symlink2 symlink3 || fail=1
# ===================================================
# ensure that -L follows symlinks, and overrides -P
-ln -P -L symlink3 hard-to-a || fail=1
-ls=$(ls -lG hard-to-a)x
-case "$ls" in
- *'hard-to-ax') ;;
- *'hard-to-a -> '*x) fail=1 ;;
- *) framework_failure_ ;;
-esac
+if ln -P -L symlink3 hard-to-a; then
+ ls=$(ls -lG hard-to-a)x
+ case "$ls" in
+ *'hard-to-ax') ;;
+ *'hard-to-a -> '*x) fail=1 ;;
+ *) framework_failure_ ;;
+ esac
+else
+ fail=1
+fi
# ===================================================
# ensure that -P links (or at least duplicates) symlinks, and overrides -L
-ln -L -P symlink3 hard-to-3 || fail=1
-ls=$(ls -lG hard-to-3)x
-case "$ls" in
- *'hard-to-3 -> symlink2x') ;;
- *'hard-to-3x') fail=1 ;;
- *'hard-to-3 -> '*x) fail=1 ;;
- *) framework_failure_ ;;
-esac
+if ln -L -P symlink3 hard-to-3; then
+ ls=$(ls -lG hard-to-3)x
+ case "$ls" in
+ *'hard-to-3 -> symlink2x') ;;
+ *'hard-to-3x') fail=1 ;;
+ *'hard-to-3 -> '*x) fail=1 ;;
+ *) framework_failure_ ;;
+ esac
+else
+ fail=1
+fi
# ===================================================
# Create a hard link to a dangling symlink.