2007-02-23 Bruno Haible <bruno@clisp.org>
+ * tests/readlink/can-e: Put the closing double-quote at the end of a
+ backquoted word, not in the middle. Works around a bug in sh on
+ OSF/1 4.0d.
+ * tests/readlink/can-f: Likewise.
+ * tests/readlink/can-m: Likewise.
+
* tests/du/slink: Skip the test if executing on an nfsv3 file system.
This avoids a test failure at least on OSF/1 4.0d.
#!/bin/sh
# tests for canonicalize-existing mode (readlink -e).
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007 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
for p in "" "$pwd/$tmp/"; do
fail=1
- v=`readlink -e "${p}"regfile` || break
+ v=`readlink -e "${p}regfile"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -e "${p}"./regfile/` && break
+ v=`readlink -e "${p}./regfile/"` && break
test -z "$v" || break
- v=`readlink -e "${p}"subdir` || break
+ v=`readlink -e "${p}subdir"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -e "${p}"./subdir/` || break
+ v=`readlink -e "${p}./subdir/"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -e "${p}"missing` && break
+ v=`readlink -e "${p}missing"` && break
test -z "$v" || break
- v=`readlink -e "${p}"./missing/` && break
+ v=`readlink -e "${p}./missing/"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link1` || break
+ v=`readlink -e "${p}link1"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -e "${p}"./link1/` && break
+ v=`readlink -e "${p}./link1/"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link1/more` && break
+ v=`readlink -e "${p}link1/more"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link2` || break
+ v=`readlink -e "${p}link2"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -e "${p}"./link2/` || break
+ v=`readlink -e "${p}./link2/"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -e "${p}"link2/more` && break
+ v=`readlink -e "${p}link2/more"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link3` && break
+ v=`readlink -e "${p}link3"` && break
test -z "$v" || break
- v=`readlink -e "${p}"./link3/` && break
+ v=`readlink -e "${p}./link3/"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link3/more` && break
+ v=`readlink -e "${p}link3/more"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link4` && break
+ v=`readlink -e "${p}link4"` && break
test -z "$v" || break
- v=`readlink -e "${p}"./link4/` && break
+ v=`readlink -e "${p}./link4/"` && break
test -z "$v" || break
- v=`readlink -e "${p}"link4/more` && break
+ v=`readlink -e "${p}link4/more"` && break
test -z "$v" || break
fail=0
#!/bin/sh
# tests for canonicalize mode (readlink -f).
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007 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
for p in "" "$pwd/$tmp/"; do
fail=1
- v=`readlink -f "${p}"regfile` || break
+ v=`readlink -f "${p}regfile"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -f "${p}"./regfile/` && break
+ v=`readlink -f "${p}./regfile/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"regfile/more` && break
+ v=`readlink -f "${p}regfile/more"` && break
test -z "$v" || break
- v=`readlink -f "${p}"./regfile/more/` && break
+ v=`readlink -f "${p}./regfile/more/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"subdir` || break
+ v=`readlink -f "${p}subdir"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -f "${p}"./subdir/` || break
+ v=`readlink -f "${p}./subdir/"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -f "${p}"subdir/more` || break
+ v=`readlink -f "${p}subdir/more"` || break
test "$v" = "$my_pwd/$tmp/subdir/more" || break
- v=`readlink -f "${p}"./subdir/more/` && break
+ v=`readlink -f "${p}./subdir/more/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"missing` || break
+ v=`readlink -f "${p}missing"` || break
test "$v" = "$my_pwd/$tmp/missing" || break
- v=`readlink -f "${p}"./missing/` && break
+ v=`readlink -f "${p}./missing/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"missing/more` && break
+ v=`readlink -f "${p}missing/more"` && break
test -z "$v" || break
- v=`readlink -f "${p}"./missing/more/` && break
+ v=`readlink -f "${p}./missing/more/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link1` || break
+ v=`readlink -f "${p}link1"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -f "${p}"./link1/` && break
+ v=`readlink -f "${p}./link1/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link1/more` && break
+ v=`readlink -f "${p}link1/more"` && break
test -z "$v" || break
- v=`readlink -f "${p}"./link1/more/` && break
+ v=`readlink -f "${p}./link1/more/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link2` || break
+ v=`readlink -f "${p}link2"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -f "${p}"./link2/` || break
+ v=`readlink -f "${p}./link2/"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -f "${p}"link2/more` || break
+ v=`readlink -f "${p}link2/more"` || break
test "$v" = "$my_pwd/$tmp/subdir/more" || break
- v=`readlink -f "${p}"./link2/more/` && break
+ v=`readlink -f "${p}./link2/more/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link2/more/more2` && break
+ v=`readlink -f "${p}link2/more/more2"` && break
test -z "$v" || break
- v=`readlink -f "${p}"./link2/more/more2/` && break
+ v=`readlink -f "${p}./link2/more/more2/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link3` || break
+ v=`readlink -f "${p}link3"` || break
test "$v" = "$my_pwd/$tmp/missing" || break
- v=`readlink -f "${p}"./link3/` && break
+ v=`readlink -f "${p}./link3/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link3/more` && break
+ v=`readlink -f "${p}link3/more"` && break
test -z "$v" || break
- v=`readlink -f "${p}"./link3/more/` && break
+ v=`readlink -f "${p}./link3/more/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link4` || break
+ v=`readlink -f "${p}link4"` || break
test "$v" = "$my_pwd/$tmp/subdir/missing" || break
- v=`readlink -f "${p}"./link4/` && break
+ v=`readlink -f "${p}./link4/"` && break
test -z "$v" || break
- v=`readlink -f "${p}"link4/more` && break
+ v=`readlink -f "${p}link4/more"` && break
test -z "$v" || break
fail=0
#!/bin/sh
# tests for canonicalize-missing mode (readlink -m).
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007 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
for p in "" "$pwd/$tmp/"; do
fail=1
- v=`readlink -m "${p}"regfile` || break
+ v=`readlink -m "${p}regfile"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -m "${p}"./regfile/` || break
+ v=`readlink -m "${p}./regfile/"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -m "${p}"regfile/more` || break
+ v=`readlink -m "${p}regfile/more"` || break
test "$v" = "$my_pwd/$tmp/regfile/more" || break
- v=`readlink -m "${p}"./regfile/more/` || break
+ v=`readlink -m "${p}./regfile/more/"` || break
test "$v" = "$my_pwd/$tmp/regfile/more" || break
- v=`readlink -m "${p}"subdir` || break
+ v=`readlink -m "${p}subdir"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -m "${p}"./subdir/` || break
+ v=`readlink -m "${p}./subdir/"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -m "${p}"subdir/more` || break
+ v=`readlink -m "${p}subdir/more"` || break
test "$v" = "$my_pwd/$tmp/subdir/more" || break
- v=`readlink -m "${p}"./subdir/more/` || break
+ v=`readlink -m "${p}./subdir/more/"` || break
test "$v" = "$my_pwd/$tmp/subdir/more" || break
- v=`readlink -m "${p}"missing` || break
+ v=`readlink -m "${p}missing"` || break
test "$v" = "$my_pwd/$tmp/missing" || break
- v=`readlink -m "${p}"./missing/` || break
+ v=`readlink -m "${p}./missing/"` || break
test "$v" = "$my_pwd/$tmp/missing" || break
- v=`readlink -m "${p}"missing/more` || break
+ v=`readlink -m "${p}missing/more"` || break
test "$v" = "$my_pwd/$tmp/missing/more" || break
- v=`readlink -m "${p}"./missing/more/` || break
+ v=`readlink -m "${p}./missing/more/"` || break
test "$v" = "$my_pwd/$tmp/missing/more" || break
- v=`readlink -m "${p}"link1` || break
+ v=`readlink -m "${p}link1"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -m "${p}"./link1/` || break
+ v=`readlink -m "${p}./link1/"` || break
test "$v" = "$my_pwd/$tmp/regfile" || break
- v=`readlink -m "${p}"link1/more` || break
+ v=`readlink -m "${p}link1/more"` || break
test "$v" = "$my_pwd/$tmp/regfile/more" || break
- v=`readlink -m "${p}"./link1/more/` || break
+ v=`readlink -m "${p}./link1/more/"` || break
test "$v" = "$my_pwd/$tmp/regfile/more" || break
- v=`readlink -m "${p}"link2` || break
+ v=`readlink -m "${p}link2"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -m "${p}"./link2/` || break
+ v=`readlink -m "${p}./link2/"` || break
test "$v" = "$my_pwd/$tmp/subdir" || break
- v=`readlink -m "${p}"link2/more` || break
+ v=`readlink -m "${p}link2/more"` || break
test "$v" = "$my_pwd/$tmp/subdir/more" || break
- v=`readlink -m "${p}"./link2/more/` || break
+ v=`readlink -m "${p}./link2/more/"` || break
test "$v" = "$my_pwd/$tmp/subdir/more" || break
- v=`readlink -m "${p}"link2/more/more2` || break
+ v=`readlink -m "${p}link2/more/more2"` || break
test "$v" = "$my_pwd/$tmp/subdir/more/more2" || break
- v=`readlink -m "${p}"./link2/more/more2/` || break
+ v=`readlink -m "${p}./link2/more/more2/"` || break
test "$v" = "$my_pwd/$tmp/subdir/more/more2" || break
- v=`readlink -m "${p}"link3` || break
+ v=`readlink -m "${p}link3"` || break
test "$v" = "$my_pwd/$tmp/missing" || break
- v=`readlink -m "${p}"./link3/` || break
+ v=`readlink -m "${p}./link3/"` || break
test "$v" = "$my_pwd/$tmp/missing" || break
- v=`readlink -m "${p}"link3/more` || break
+ v=`readlink -m "${p}link3/more"` || break
test "$v" = "$my_pwd/$tmp/missing/more" || break
- v=`readlink -m "${p}"./link3/more/` || break
+ v=`readlink -m "${p}./link3/more/"` || break
test "$v" = "$my_pwd/$tmp/missing/more" || break
- v=`readlink -m "${p}"link4` || break
+ v=`readlink -m "${p}link4"` || break
test "$v" = "$my_pwd/$tmp/subdir/missing" || break
- v=`readlink -m "${p}"./link4/` || break
+ v=`readlink -m "${p}./link4/"` || break
test "$v" = "$my_pwd/$tmp/subdir/missing" || break
- v=`readlink -m "${p}"link4/more` || break
+ v=`readlink -m "${p}link4/more"` || break
test "$v" = "$my_pwd/$tmp/subdir/missing/more" || break
- v=`readlink -m "${p}"./link4/more/` || break
+ v=`readlink -m "${p}./link4/more/"` || break
test "$v" = "$my_pwd/$tmp/subdir/missing/more" || break
fail=0