mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-23 18:05:42 +08:00
tests: change `...' to '...' on lines not matching /[=\$]/
Exempt lines with '$' or '=', since those are prone to improper conversion. Run this: git grep -l "\`[^']*'" tests \ |xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
This commit is contained in:
parent
50610144b0
commit
dd0e4c5621
@ -48,7 +48,7 @@ defined $ENV{DJDIR}
|
||||
# {filename => 'contents'} filename and contents
|
||||
# {filename => undef} filename only -- $(srcdir)/filename must exist
|
||||
#
|
||||
# FIXME: If there is more than one input file, then you can't specify `REDIR'.
|
||||
# FIXME: If there is more than one input file, then you can't specify 'REDIR'.
|
||||
# PIPE is still ok.
|
||||
#
|
||||
# I/O spec: a hash ref with the following properties
|
||||
@ -60,9 +60,9 @@ defined $ENV{DJDIR}
|
||||
# {OUT => {'filename'=>undef}} compare contents of existing filename to
|
||||
# stdout from cmd
|
||||
# {OUT => {'filename'=>[$CTOR, $DTOR]}} $CTOR and $DTOR are references to
|
||||
# functions, each which is passed the single argument `filename'.
|
||||
# functions, each which is passed the single argument 'filename'.
|
||||
# $CTOR must create `filename'.
|
||||
# DTOR may be omitted in which case `sub{unlink @_[0]}' is used.
|
||||
# DTOR may be omitted in which case 'sub{unlink @_[0]}' is used.
|
||||
# FIXME: implement this
|
||||
# {ERR => ...}
|
||||
# Same as for OUT, but compare with stderr, not stdout.
|
||||
@ -213,10 +213,10 @@ sub getlimits()
|
||||
}
|
||||
|
||||
# FIXME: cleanup on interrupt
|
||||
# FIXME: extract `do_1_test' function
|
||||
# FIXME: extract 'do_1_test' function
|
||||
|
||||
# FIXME: having to include $program_name here is an expedient kludge.
|
||||
# Library code doesn't `die'.
|
||||
# Library code doesn't 'die'.
|
||||
sub run_tests ($$$$$)
|
||||
{
|
||||
my ($program_name, $prog, $t_spec, $save_temps, $verbose) = @_;
|
||||
|
@ -53,7 +53,7 @@ check-root:
|
||||
|
||||
check-recursive: root-hint
|
||||
|
||||
# Advertise `check-root' target.
|
||||
# Advertise 'check-root' target.
|
||||
.PHONY: root-hint
|
||||
root-hint:
|
||||
@echo '***********************************************************'
|
||||
|
@ -66,7 +66,7 @@ chown --from=:$g1 :$g2 f; test `stat --printf=%g f` = $g2 || fail=1
|
||||
|
||||
# This *should* change the group of f.
|
||||
# Though note that the diagnostic is misleading in that
|
||||
# it says the `group of `symlink'' has been changed.
|
||||
# it says the 'group of `symlink'' has been changed.
|
||||
chgrp $g1 symlink; test `stat --printf=%g f` = $g1 || fail=1
|
||||
chown --from=:$g1 :$g2 f; test `stat --printf=%g f` = $g2 || fail=1
|
||||
|
||||
|
@ -52,7 +52,7 @@ set _ `ls -ln f`; g=$5; test "$g" = $g2 || fail=1
|
||||
|
||||
# This *should* change the group of f.
|
||||
# Though note that the diagnostic you'd get with -c is misleading in that
|
||||
# it says the `group of `symlink'' has been changed.
|
||||
# it says the 'group of `symlink'' has been changed.
|
||||
chgrp --dereference $g1 symlink
|
||||
set _ `ls -ln f`; g=$5; test "$g" = $g1 || fail=1
|
||||
set _ `ls -ln symlink`; g=$5; test "$g" = $g2 || fail=1
|
||||
|
@ -37,9 +37,9 @@ prog=chgrp
|
||||
# NOTE: this code is the same for all tests/*/no-x tests.
|
||||
# Depending on whether fts is using native fdopendir, we see one
|
||||
# of the following diagnostics (note also the /y suffix in one case):
|
||||
# prog: `d/no-x': Permission denied
|
||||
# prog: cannot access `d/no-x/y': Permission denied
|
||||
# prog: cannot read directory `d/no-x': Permission denied
|
||||
# prog: 'd/no-x': Permission denied
|
||||
# prog: cannot access 'd/no-x/y': Permission denied
|
||||
# prog: cannot read directory 'd/no-x': Permission denied
|
||||
# Convert either of the latter two to the first one.
|
||||
sed "s/^$prog: cannot access /$prog: /" out > t && mv t out
|
||||
sed "s/^$prog: cannot read directory /$prog: /" out > t && mv t out
|
||||
|
@ -43,7 +43,7 @@ changed='
|
||||
3
|
||||
'
|
||||
for i in $changed; do
|
||||
# Filter out symlinks (entries that end in `s'), since it's not
|
||||
# Filter out symlinks (entries that end in 's'), since it's not
|
||||
# possible to change their group/owner information on some systems.
|
||||
case $i in *s) continue;; esac
|
||||
set _ `ls -dgn $i`; shift
|
||||
@ -59,7 +59,7 @@ not_changed='
|
||||
3/3F
|
||||
'
|
||||
for i in $not_changed; do
|
||||
# Filter out symlinks (entries that end in `s'), since it's not
|
||||
# Filter out symlinks (entries that end in 's'), since it's not
|
||||
# possible to change their group/owner information on some systems.
|
||||
case $i in *s) continue;; esac
|
||||
set _ `ls -dgn $i`; shift
|
||||
|
@ -32,9 +32,9 @@ prog=chmod
|
||||
# NOTE: this code is the same for all tests/*/no-x tests.
|
||||
# Depending on whether fts is using native fdopendir, we see one
|
||||
# of the following diagnostics (note also the /y suffix in one case):
|
||||
# prog: `d/no-x': Permission denied
|
||||
# prog: cannot access `d/no-x/y': Permission denied
|
||||
# prog: cannot read directory `d/no-x': Permission denied
|
||||
# prog: 'd/no-x': Permission denied
|
||||
# prog: cannot access 'd/no-x/y': Permission denied
|
||||
# prog: cannot read directory 'd/no-x': Permission denied
|
||||
# Convert either of the latter two to the first one.
|
||||
sed "s/^$prog: cannot access /$prog: /" out > t && mv t out
|
||||
sed "s/^$prog: cannot read directory /$prog: /" out > t && mv t out
|
||||
@ -47,7 +47,7 @@ EOF
|
||||
compare exp out || fail=1
|
||||
|
||||
cd a
|
||||
# This will fail with ``chmod: fts_read failed: Permission denied''
|
||||
# This will fail with '`chmod: fts_read failed: Permission denied''
|
||||
chmod a-x . b 2> /dev/null && fail=1
|
||||
# chmod must exit with status 1.
|
||||
# Due to a bug in coreutils-5.93's fts.c, chmod would provoke
|
||||
|
@ -21,7 +21,7 @@ print_ver_ chmod
|
||||
|
||||
|
||||
# Before coreutils-5.92, this would mistakenly succeed,
|
||||
# and act like `chmod 0 .'.
|
||||
# and act like 'chmod 0 .'.
|
||||
chmod 0-followed-by-anything . 2> /dev/null && fail=1
|
||||
chmod 7-followed-by-anything . 2> /dev/null && fail=1
|
||||
chmod 8 . 2> /dev/null && fail=1
|
||||
|
@ -30,7 +30,7 @@ chown --dereference $user dangle 2> out1 && fail=1
|
||||
sed 's/: [^:]*$//' out1 > out
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
chown: cannot dereference `dangle'
|
||||
chown: cannot dereference 'dangle'
|
||||
EOF
|
||||
|
||||
compare exp out || fail=1
|
||||
|
@ -47,17 +47,17 @@ chown -RLh --preserve-root `id -u` d >> out 2>&1 && fail=1
|
||||
chgrp -RLh --preserve-root `id -g` d >> out 2>&1 && fail=1
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
chown: it is dangerous to operate recursively on `/'
|
||||
chown: it is dangerous to operate recursively on '/'
|
||||
chown: use --no-preserve-root to override this failsafe
|
||||
chgrp: it is dangerous to operate recursively on `/'
|
||||
chgrp: it is dangerous to operate recursively on '/'
|
||||
chgrp: use --no-preserve-root to override this failsafe
|
||||
chmod: it is dangerous to operate recursively on `/'
|
||||
chmod: it is dangerous to operate recursively on '/'
|
||||
chmod: use --no-preserve-root to override this failsafe
|
||||
==== test -RHh
|
||||
==== test -RLh
|
||||
chown: it is dangerous to operate recursively on `d/slink-to-root' (same as `/')
|
||||
chown: it is dangerous to operate recursively on 'd/slink-to-root' (same as '/')
|
||||
chown: use --no-preserve-root to override this failsafe
|
||||
chgrp: it is dangerous to operate recursively on `d/slink-to-root' (same as `/')
|
||||
chgrp: it is dangerous to operate recursively on 'd/slink-to-root' (same as '/')
|
||||
chgrp: use --no-preserve-root to override this failsafe
|
||||
EOF
|
||||
|
||||
|
@ -28,7 +28,7 @@ cp --b=simple a~ a > out 2>&1 && fail=1
|
||||
sed "s,cp:,XXX:," out > out2
|
||||
|
||||
cat > exp <<\EOF
|
||||
XXX: backing up `a' would destroy source; `a~' not copied
|
||||
XXX: backing up 'a' would destroy source; 'a~' not copied
|
||||
EOF
|
||||
|
||||
compare exp out2 || fail=1
|
||||
|
@ -83,7 +83,7 @@ grep "Operation not supported" err && fail=1
|
||||
# to the file type.
|
||||
# Note: this test could also be run by a regular (non-root) user in an
|
||||
# NFS mounted directory. When doing that, I get this diagnostic:
|
||||
# cp: failed to set the security context of `g' to `system_u:object_r:nfs_t': \
|
||||
# cp: failed to set the security context of 'g' to 'system_u:object_r:nfs_t': \
|
||||
# Operation not supported
|
||||
cat <<\EOF > exp || framework_failure_
|
||||
cp: failed to set the security context of
|
||||
|
@ -26,7 +26,7 @@ ln -s ../c b || framework_failure_
|
||||
|
||||
|
||||
# Before coreutils-5.94, the following would fail with this message:
|
||||
# cp: will not create hard link `d/b/c' to directory `d/a/c'
|
||||
# cp: will not create hard link 'd/b/c' to directory 'd/a/c'
|
||||
cp -RL a b d || fail=1
|
||||
test -d a/c || fail=1
|
||||
test -d b/c || fail=1
|
||||
|
@ -22,7 +22,7 @@ print_ver_ cp
|
||||
umask 022
|
||||
|
||||
# Be careful to close $actual before removing the containing directory.
|
||||
# Use `1>&2' rather than `1<&-' since the latter appears not to work
|
||||
# Use '1>&2' rather than '1<&-' since the latter appears not to work
|
||||
# with /bin/sh from powerpc-ibm-aix4.2.0.0.
|
||||
|
||||
actual=actual
|
||||
|
@ -89,7 +89,7 @@ rm -f err noxattr/a
|
||||
cp -a --preserve=xattr xattr/a noxattr/ 2>err && fail=1
|
||||
if grep '^#define USE_XATTR 1' $CONFIG_HEADER > /dev/null; then
|
||||
cat <<\EOF > exp
|
||||
cp: setting attributes for `noxattr/a': Operation not supported
|
||||
cp: setting attributes for 'noxattr/a': Operation not supported
|
||||
EOF
|
||||
else
|
||||
cat <<\EOF > exp
|
||||
|
@ -29,7 +29,7 @@ chmod u=rx,go=,-st D || framework_failure_
|
||||
# This is expected to exit non-zero, because it can't read D/a.
|
||||
cp -pR D DD > /dev/null 2>&1 && fail=1
|
||||
|
||||
# Permissions on DD must be `dr-x------'
|
||||
# Permissions on DD must be 'dr-x------'
|
||||
|
||||
mode=`ls -ld DD|cut -b-10`
|
||||
test "$mode" = dr-x------ || fail=1
|
||||
@ -38,7 +38,7 @@ chmod 0 D
|
||||
ln -s D/D symlink
|
||||
touch F
|
||||
cat > exp <<\EOF
|
||||
cp: accessing `symlink': Permission denied
|
||||
cp: accessing 'symlink': Permission denied
|
||||
EOF
|
||||
|
||||
cp F symlink 2> out && fail=1
|
||||
|
@ -48,7 +48,7 @@ fallocate -l 600MiB space.test ||
|
||||
|
||||
# Disable this test on old BTRFS (e.g. Fedora 14)
|
||||
# which reports ordinary extents for unwritten ones.
|
||||
filefrag space.test || skip_ 'the `filefrag` utility is missing'
|
||||
filefrag space.test || skip_ 'the 'filefrag` utility is missing'
|
||||
filefrag -v space.test | grep -F 'unwritten' > /dev/null ||
|
||||
skip_ 'this file system does not report empty extents as "unwritten"'
|
||||
|
||||
|
@ -34,7 +34,7 @@ timeout 10 truncate -s1T f || framework_failure_
|
||||
|
||||
# Disable this test on old BTRFS (e.g. Fedora 14)
|
||||
# which reports (unwritten) extents for holes.
|
||||
filefrag f || skip_ 'the `filefrag` utility is missing'
|
||||
filefrag f || skip_ 'the 'filefrag` utility is missing'
|
||||
filefrag f | grep -F ': 0 extents found' > /dev/null ||
|
||||
skip_ 'this file system reports extents for holes'
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# In 4.0.35 and earlier, `mkdir dir && cp -R dir dir' would produce this:
|
||||
# cp: won't create hard link `dir/dir/dir' to directory `'
|
||||
# In 4.0.35 and earlier, 'mkdir dir && cp -R dir dir' would produce this:
|
||||
# cp: won't create hard link 'dir/dir/dir' to directory ''
|
||||
# Now it gives this:
|
||||
# cp: can't copy a directory `dir' into itself `dir/dir'
|
||||
# cp: can't copy a directory 'dir' into itself 'dir/dir'
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ cp
|
||||
@ -41,13 +41,13 @@ cp -rl a dir dir 2>> out && fail=1
|
||||
echo 4 >> out
|
||||
|
||||
cat > exp <<\EOF
|
||||
cp: cannot copy a directory, `dir', into itself, `dir/dir'
|
||||
cp: cannot copy a directory, 'dir', into itself, 'dir/dir'
|
||||
1
|
||||
cp: cannot copy a directory, `dir', into itself, `dir/dir'
|
||||
cp: cannot copy a directory, 'dir', into itself, 'dir/dir'
|
||||
2
|
||||
cp: cannot copy a directory, `dir', into itself, `dir/dir'
|
||||
cp: cannot copy a directory, 'dir', into itself, 'dir/dir'
|
||||
3
|
||||
cp: cannot copy a directory, `dir', into itself, `dir/dir'
|
||||
cp: cannot copy a directory, 'dir', into itself, 'dir/dir'
|
||||
4
|
||||
EOF
|
||||
#'
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# ensure that `cp -d' preserves hard-links between command line arguments
|
||||
# ensure that 'cp -d' preserves hard-links between command line arguments
|
||||
# ensure that --preserve=links works with -RH and -RL
|
||||
|
||||
# Copyright (C) 2001-2002, 2004, 2006-2012 Free Software Foundation, Inc.
|
||||
|
@ -29,7 +29,7 @@ cd ..
|
||||
|
||||
|
||||
# It should fail with a message something like this:
|
||||
# ./cp: `a/foo' and `b/foo' are the same file
|
||||
# ./cp: 'a/foo' and 'b/foo' are the same file
|
||||
cp -d a/foo b 2>/dev/null
|
||||
|
||||
# Fail this test if the exit status is not 1
|
||||
|
@ -29,7 +29,7 @@ cd ..
|
||||
|
||||
|
||||
# It should fail with a message something like this:
|
||||
# cp: `a' and `b/foo' are the same file
|
||||
# cp: 'a' and 'b/foo' are the same file
|
||||
cp -d a b 2>/dev/null
|
||||
|
||||
# Fail this test if the exit status is not 1
|
||||
|
@ -26,7 +26,7 @@ ln -s a b
|
||||
|
||||
|
||||
# It should fail with a message something like this:
|
||||
# cp: `a' and `b' are the same file
|
||||
# cp: 'a' and 'b' are the same file
|
||||
cp -d a b 2>/dev/null
|
||||
|
||||
# Fail this test if the exit status is not 1
|
||||
|
@ -24,7 +24,7 @@ very_expensive_
|
||||
umask 037
|
||||
|
||||
|
||||
# Now, try it with `mv', with combinations of --force, no-f and
|
||||
# Now, try it with 'mv', with combinations of --force, no-f and
|
||||
# existing-destination and not.
|
||||
for u in 31 37 2; do
|
||||
echo umask: $u
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
# Restored old behavior (whereby cp -r preserves symlinks) in 4.1.6,
|
||||
# though now such usage evokes a warning:
|
||||
# cp: `slink': WARNING: using -r to copy symbolic links is not portable
|
||||
# cp: 'slink': WARNING: using -r to copy symbolic links is not portable
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ cp
|
||||
|
@ -20,7 +20,7 @@
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ cp
|
||||
|
||||
# Unset CDPATH. Otherwise, output from the `cd dir' command
|
||||
# Unset CDPATH. Otherwise, output from the 'cd dir' command
|
||||
# can make this test fail.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
@ -128,16 +128,16 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
|
||||
done
|
||||
|
||||
cat <<\EOF | sed "$remove_these_sed" > expected
|
||||
1 [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
|
||||
1 -d [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
|
||||
1 -f [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
|
||||
1 -df [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
|
||||
1 [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
|
||||
1 -d [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
|
||||
1 -f [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
|
||||
1 -df [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
|
||||
0 --rem (foo symlink)
|
||||
0 -b (foo symlink symlink.~1~ -> foo)
|
||||
0 -bd (foo symlink symlink.~1~ -> foo)
|
||||
0 -bf (foo symlink symlink.~1~ -> foo)
|
||||
0 -bdf (foo symlink symlink.~1~ -> foo)
|
||||
1 -l [cp: cannot create hard link `symlink' to `foo'] (foo symlink -> foo)
|
||||
1 -l [cp: cannot create hard link 'symlink' to 'foo'] (foo symlink -> foo)
|
||||
0 -dl (foo symlink -> foo)
|
||||
0 -fl (foo symlink)
|
||||
0 -dfl (foo symlink)
|
||||
@ -146,14 +146,14 @@ cat <<\EOF | sed "$remove_these_sed" > expected
|
||||
0 -bfl (foo symlink symlink.~1~ -> foo)
|
||||
0 -bdfl (foo symlink symlink.~1~ -> foo)
|
||||
|
||||
1 [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 -d [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 -f [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 -df [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 --rem [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 -b [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
1 -d [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
1 -f [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
1 -df [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
1 --rem [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
1 -b [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
0 -bd (foo -> foo foo.~1~ symlink -> foo) symlink-loop symlink-loop
|
||||
1 -bf [cp: `symlink' and `foo' are the same file] (foo symlink -> foo)
|
||||
1 -bf [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
|
||||
0 -bdf (foo -> foo foo.~1~ symlink -> foo) symlink-loop symlink-loop
|
||||
0 -l (foo symlink -> foo)
|
||||
0 -dl (foo symlink -> foo)
|
||||
@ -161,13 +161,13 @@ cat <<\EOF | sed "$remove_these_sed" > expected
|
||||
0 -bl (foo symlink -> foo)
|
||||
0 -bfl (foo symlink -> foo)
|
||||
|
||||
1 [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 -d [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 -f [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 -df [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 --rem [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 -b [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 -bd [cp: `foo' and `foo' are the same file] (foo)
|
||||
1 [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
1 -d [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
1 -f [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
1 -df [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
1 --rem [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
1 -b [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
1 -bd [cp: 'foo' and 'foo' are the same file] (foo)
|
||||
0 -bf (foo foo.~1~)
|
||||
0 -bdf (foo foo.~1~)
|
||||
0 -l (foo)
|
||||
@ -179,24 +179,24 @@ cat <<\EOF | sed "$remove_these_sed" > expected
|
||||
0 -bfl (foo foo.~1~)
|
||||
0 -bdfl (foo foo.~1~)
|
||||
|
||||
1 [cp: `sl1' and `sl2' are the same file] (foo sl1 -> foo sl2 -> foo)
|
||||
1 [cp: 'sl1' and 'sl2' are the same file] (foo sl1 -> foo sl2 -> foo)
|
||||
0 -d (foo sl1 -> foo sl2 -> foo)
|
||||
1 -f [cp: `sl1' and `sl2' are the same file] (foo sl1 -> foo sl2 -> foo)
|
||||
1 -f [cp: 'sl1' and 'sl2' are the same file] (foo sl1 -> foo sl2 -> foo)
|
||||
0 -df (foo sl1 -> foo sl2 -> foo)
|
||||
0 --rem (foo sl1 -> foo sl2)
|
||||
0 -b (foo sl1 -> foo sl2 sl2.~1~ -> foo)
|
||||
0 -bd (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
|
||||
0 -bf (foo sl1 -> foo sl2 sl2.~1~ -> foo)
|
||||
0 -bdf (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
|
||||
1 -l [cp: cannot create hard link `sl2' to `sl1'] (foo sl1 -> foo sl2 -> foo)
|
||||
1 -l [cp: cannot create hard link 'sl2' to 'sl1'] (foo sl1 -> foo sl2 -> foo)
|
||||
0 -fl (foo sl1 -> foo sl2 -> foo)
|
||||
0 -bl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
|
||||
0 -bfl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
|
||||
|
||||
1 [cp: `foo' and `hardlink' are the same file] (foo hardlink)
|
||||
1 -d [cp: `foo' and `hardlink' are the same file] (foo hardlink)
|
||||
1 -f [cp: `foo' and `hardlink' are the same file] (foo hardlink)
|
||||
1 -df [cp: `foo' and `hardlink' are the same file] (foo hardlink)
|
||||
1 [cp: 'foo' and 'hardlink' are the same file] (foo hardlink)
|
||||
1 -d [cp: 'foo' and 'hardlink' are the same file] (foo hardlink)
|
||||
1 -f [cp: 'foo' and 'hardlink' are the same file] (foo hardlink)
|
||||
1 -df [cp: 'foo' and 'hardlink' are the same file] (foo hardlink)
|
||||
0 --rem (foo hardlink)
|
||||
0 -b (foo hardlink hardlink.~1~)
|
||||
0 -bd (foo hardlink hardlink.~1~)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# `test cp --update A B' where A and B are both symlinks that point
|
||||
# 'test cp --update A B' where A and B are both symlinks that point
|
||||
# to the same file
|
||||
|
||||
# Copyright (C) 2000, 2002, 2004, 2006-2012 Free Software Foundation, Inc.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# make sure `cp -p' preserves special bits
|
||||
# make sure 'cp -p' preserves special bits
|
||||
# This works only when run as root.
|
||||
|
||||
# Copyright (C) 2000-2002, 2004, 2006-2012 Free Software Foundation, Inc.
|
||||
|
@ -26,7 +26,7 @@ ln -s dir symlink || framework_failure_
|
||||
cp -dR symlink/ s || fail=1
|
||||
set `ls -l s`
|
||||
|
||||
# Prior to fileutils-4.0q, the following would have output ...`s -> dir'
|
||||
# Prior to fileutils-4.0q, the following would have output ...'s -> dir'
|
||||
# because the trailing slash was removed unconditionally (now you have to
|
||||
# use the new --strip-trailing-slash option) causing cp to reproduce the
|
||||
# symlink. Now, the trailing slash is interpreted by the stat library
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Ensure dd treats `--' properly.
|
||||
# Ensure dd treats '--' properly.
|
||||
# Also test some flag values.
|
||||
|
||||
# Copyright (C) 1999, 2004-2012 Free Software Foundation, Inc.
|
||||
|
@ -21,15 +21,15 @@
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ du
|
||||
|
||||
# Creating a 2GB file counts as `very expensive'.
|
||||
# Creating a 2GB file counts as 'very expensive'.
|
||||
very_expensive_
|
||||
|
||||
|
||||
# Get number of free kilobytes on current partition, so we can
|
||||
# skip this test if there is insufficient free space.
|
||||
|
||||
# This technique relies on the fact that the `Available' kilobyte
|
||||
# count is the number just before the one with a trailing `%'.
|
||||
# This technique relies on the fact that the 'Available' kilobyte
|
||||
# count is the number just before the one with a trailing '%'.
|
||||
free_kb=`df -kP .|tail -1|sed 's/ [0-9][0-9]*%.*//;s/ *$//;s/.* //'`
|
||||
case "$free_kb" in
|
||||
[0-9]*) ;;
|
||||
|
@ -29,7 +29,7 @@ fi
|
||||
|
||||
# FIXME: this should be a test of dd.
|
||||
# On some systems (at least linux-2.4.18 + NFS to disks on a Solaris system)
|
||||
# the `dd' command above mistakenly creates a file of length `0', yet
|
||||
# the 'dd' command above mistakenly creates a file of length '0', yet
|
||||
# doesn't fail. The root of that failure is that the ftruncate call
|
||||
# returns zero but doesn't do its job. Detect this failure.
|
||||
set x `ls -gG big`
|
||||
@ -41,7 +41,7 @@ Consider rerunning this test on a different file system."
|
||||
fi
|
||||
|
||||
|
||||
# This would print `0 big' with coreutils-4.5.8.
|
||||
# This would print '0 big' with coreutils-4.5.8.
|
||||
du -ab big > out || fail=1
|
||||
|
||||
cat <<\EOF > exp
|
||||
|
@ -30,7 +30,7 @@ ln -s nowhere dangle || framework_failure_
|
||||
|
||||
|
||||
# This used to fail with the following diagnostic:
|
||||
# du: `b': No such file or directory
|
||||
# du: 'b': No such file or directory
|
||||
du -sD slink b > /dev/null 2>&1 || fail=1
|
||||
|
||||
# This used to fail to report the dangling symlink.
|
||||
|
@ -43,7 +43,7 @@ my @Tests =
|
||||
# input file name of '-'
|
||||
['minus-in-stdin', '--files0-from=-', '<', {IN=>{f=>'-'}}, {EXIT=>1},
|
||||
{ERR => "$prog: when reading file names from stdin, no file name of"
|
||||
. " `-' allowed\n"}],
|
||||
. " '-' allowed\n"}],
|
||||
|
||||
# empty input, regular file
|
||||
['empty', '--files0-from=@AUX@', {AUX=>''}],
|
||||
|
@ -40,13 +40,13 @@ cat <<\EOF > exp || fail=1
|
||||
./c
|
||||
./d
|
||||
./e
|
||||
du: cannot read directory `./c': Permission denied
|
||||
du: cannot read directory './c': Permission denied
|
||||
EOF
|
||||
|
||||
# Map a diagnostic like this
|
||||
# du: cannot access `./c/j': Permission denied
|
||||
# du: cannot access './c/j': Permission denied
|
||||
# to this:
|
||||
# du: cannot access `./c': Permission denied
|
||||
# du: cannot access './c': Permission denied
|
||||
# And accept "cannot read directory" in place of "cannot access"
|
||||
sed "s,/c/j': ,/c': ," out > t && mv t out
|
||||
sed 's,cannot access,cannot read directory,' out > t && mv t out
|
||||
|
@ -18,10 +18,10 @@
|
||||
|
||||
# Show that fts (hence du, chmod, chgrp, chown) fails when all of the
|
||||
# following are true:
|
||||
# - `.' is not readable
|
||||
# - '.' is not readable
|
||||
# - operating on a hierarchy containing a relative name longer than PATH_MAX
|
||||
# - run on a system where gnulib's openat emulation must resort to using
|
||||
# save_cwd and restore_cwd (which fail if `.' is not readable).
|
||||
# save_cwd and restore_cwd (which fail if '.' is not readable).
|
||||
# Thus, the following du invocation should succeed on newer Linux and
|
||||
# Solaris systems, yet it must fail on systems lacking both openat and
|
||||
# /proc support. However, before coreutils-6.0 this test would fail even
|
||||
|
@ -47,9 +47,9 @@ echo foo > $i
|
||||
# If a system can handle this many symlinks in a file name,
|
||||
# just skip this test.
|
||||
|
||||
# The following also serves to record in `err' the string
|
||||
# The following also serves to record in 'err' the string
|
||||
# corresponding to strerror (ELOOP). This is necessary because while
|
||||
# Linux/libc gives `Too many levels of symbolic links', Solaris
|
||||
# Linux/libc gives 'Too many levels of symbolic links', Solaris
|
||||
# renders it as `Number of symbolic links encountered during path
|
||||
# name traversal exceeds MAXSYMLINKS'.
|
||||
|
||||
@ -61,7 +61,7 @@ too_many=`sed 's/.*: //' err`
|
||||
|
||||
# With coreutils-5.93 there was no failure.
|
||||
# With coreutils-5.94 we get the desired diagnostic:
|
||||
# du: cannot access `1/s/s/s/.../s': Too many levels of symbolic links
|
||||
# du: cannot access '1/s/s/s/.../s': Too many levels of symbolic links
|
||||
du -L 1 > /dev/null 2> out1 && fail=1
|
||||
sed "s, .1/s/s/s/[/s]*',," out1 > out || fail=1
|
||||
|
||||
|
@ -32,9 +32,9 @@ prog=du
|
||||
# NOTE: this code is the same for all tests/*/no-x tests.
|
||||
# Depending on whether fts is using native fdopendir, we see one
|
||||
# of the following diagnostics (note also the /y suffix in one case):
|
||||
# prog: `d/no-x': Permission denied
|
||||
# prog: cannot access `d/no-x/y': Permission denied
|
||||
# prog: cannot read directory `d/no-x': Permission denied
|
||||
# prog: 'd/no-x': Permission denied
|
||||
# prog: cannot access 'd/no-x/y': Permission denied
|
||||
# prog: cannot read directory 'd/no-x': Permission denied
|
||||
# Convert either of the latter two to the first one.
|
||||
sed "s/^$prog: cannot access /$prog: /" out > t && mv t out
|
||||
sed "s/^$prog: cannot read directory /$prog: /" out > t && mv t out
|
||||
|
@ -24,7 +24,7 @@ mkdir a b || framework_failure_
|
||||
|
||||
|
||||
# With du from coreutils-4.5.5 and 4.5.6, this would fail with
|
||||
# du: `b': No such file or directory
|
||||
# du: 'b': No such file or directory
|
||||
|
||||
du a b > out || fail=1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# `du /' would omit the `/' on the last line.
|
||||
# 'du /' would omit the '/' on the last line.
|
||||
|
||||
# Copyright (C) 2003-2004, 2006-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -19,14 +19,14 @@
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ du
|
||||
|
||||
# Determine if `.' is on a local (would non-NFS be sufficient?) file system.
|
||||
# Determine if '.' is on a local (would non-NFS be sufficient?) file system.
|
||||
# At least on OSF/1 4.0d, when using an nfsv3 file system,
|
||||
# each created symlink can end up having a size of 0.
|
||||
require_local_dir_
|
||||
|
||||
if df --type=xfs . >/dev/null 2>&1; then
|
||||
# At least on Irix-6.5.19, when using an xfs file system,
|
||||
# each created symlink (name lengths up to 255) would have a size of `0'.
|
||||
# each created symlink (name lengths up to 255) would have a size of '0'.
|
||||
skip_ "'.' is on an XFS file system"
|
||||
fi
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Make sure `du d/1 d/2' works.
|
||||
# Make sure 'du d/1 d/2' works.
|
||||
# That command failed with du from fileutils-4.0q.
|
||||
|
||||
# Copyright (C) 2000, 2004-2012 Free Software Foundation, Inc.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# On GNU, `id' must fail for processes with zero UIDs.
|
||||
# On GNU, 'id' must fail for processes with zero UIDs.
|
||||
|
||||
# Copyright (C) 2011-2012 Free Software Foundation, Inc.
|
||||
|
||||
@ -23,7 +23,7 @@ require_gnu_
|
||||
|
||||
sush - true || skip_ "the 'sush' command does not work"
|
||||
|
||||
# Run `id' with zero UIDs. It should exit with a non-zero status.
|
||||
# Run 'id' with zero UIDs. It should exit with a non-zero status.
|
||||
sush - id > out && fail=1
|
||||
|
||||
Exit $fail
|
||||
|
@ -153,7 +153,7 @@ require_setfacl_()
|
||||
|| skip_ "setfacl does not work on the current file system"
|
||||
}
|
||||
|
||||
# Require a controlling input `terminal'.
|
||||
# Require a controlling input 'terminal'.
|
||||
require_controlling_input_terminal_()
|
||||
{
|
||||
tty -s || have_input_tty=no
|
||||
@ -231,7 +231,7 @@ rwx_to_mode_()
|
||||
# s xs
|
||||
# T t
|
||||
# t xt
|
||||
# The `T' and `t' ones are only valid for `other'.
|
||||
# The 'T' and 't' ones are only valid for 'other'.
|
||||
s='s/S/@/;s/s/x@/;s/@/s/'
|
||||
t='s/T/@/;s/t/x@/;s/@/t/'
|
||||
|
||||
@ -310,7 +310,7 @@ require_root_()
|
||||
|
||||
skip_if_root_() { uid_is_privileged_ && skip_ "must be run as non-root"; }
|
||||
|
||||
# Set `groups' to a space-separated list of at least two groups
|
||||
# Set 'groups' to a space-separated list of at least two groups
|
||||
# of which the user is a member.
|
||||
require_membership_in_two_groups_()
|
||||
{
|
||||
@ -321,7 +321,7 @@ require_membership_in_two_groups_()
|
||||
*' '*) ;;
|
||||
*) skip_ 'requires membership in two groups
|
||||
this test requires that you be a member of more than one group,
|
||||
but running `id -G'\'' either failed or found just one. If you really
|
||||
but running 'id -G'\'' either failed or found just one. If you really
|
||||
are a member of at least two groups, then rerun this test with
|
||||
COREUTILS_GROUPS set in your environment to the space-separated list
|
||||
of group names or numbers. E.g.,
|
||||
@ -398,7 +398,7 @@ mkfifo_or_skip_()
|
||||
# Make an exception of this case -- usually we interpret framework-creation
|
||||
# failure as a test failure. However, in this case, when running on a SunOS
|
||||
# system using a disk NFS mounted from OpenBSD, the above fails like this:
|
||||
# mkfifo: cannot make fifo `fifo-10558': Not owner
|
||||
# mkfifo: cannot make fifo 'fifo-10558': Not owner
|
||||
skip_ 'unable to create a fifo'
|
||||
fi
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
|
||||
|
||||
# We use a trap below for cleanup. This requires us to go through
|
||||
# hoops to get the right exit status transported through the handler.
|
||||
# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
|
||||
# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
|
||||
# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
|
||||
# sh inside this function.
|
||||
Exit () { set +e; (exit $1); exit $1; }
|
||||
@ -172,7 +172,7 @@ else
|
||||
if test "$re_shell_" = __current__; then
|
||||
# 'eval'ing this code makes Solaris 10's /bin/sh exit with
|
||||
# $? set to 2. It does not evaluate any of the code after the
|
||||
# "unexpected" first `('. Thus, we must run it in a subshell.
|
||||
# "unexpected" first '('. Thus, we must run it in a subshell.
|
||||
( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
|
||||
else
|
||||
"$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
|
||||
|
@ -83,7 +83,7 @@ chmod 755 sub
|
||||
# Ensure that the first argument-dir has been created.
|
||||
test -d xx/yy || fail=1
|
||||
|
||||
# Make sure that the `rel' directory was not created...
|
||||
# Make sure that the 'rel' directory was not created...
|
||||
test -d sub/rel && fail=1
|
||||
# and make sure it was not created in the wrong place.
|
||||
test -d xx/rel && fail=1
|
||||
@ -105,11 +105,11 @@ fi
|
||||
touch file || fail=1
|
||||
ginstall -Dv file sub3/a/b/c/file >out 2>&1 || fail=1
|
||||
compare - out <<\EOF || fail=1
|
||||
ginstall: creating directory `sub3'
|
||||
ginstall: creating directory `sub3/a'
|
||||
ginstall: creating directory `sub3/a/b'
|
||||
ginstall: creating directory `sub3/a/b/c'
|
||||
`file' -> `sub3/a/b/c/file'
|
||||
ginstall: creating directory 'sub3'
|
||||
ginstall: creating directory 'sub3/a'
|
||||
ginstall: creating directory 'sub3/a/b'
|
||||
ginstall: creating directory 'sub3/a/b/c'
|
||||
'file' -> 'sub3/a/b/c/file'
|
||||
EOF
|
||||
|
||||
Exit $fail
|
||||
|
@ -16,7 +16,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Note that the tests below use `ginstall', not install, because
|
||||
# Note that the tests below use 'ginstall', not install, because
|
||||
# that's the name of the binary in ../../src.
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Ensure that `install -s' doesn't infloop when its parent
|
||||
# Ensure that 'install -s' doesn't infloop when its parent
|
||||
# process traps CHLD signal.
|
||||
|
||||
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
|
||||
@ -26,7 +26,7 @@ print_ver_ ginstall
|
||||
# ash doesn't support "trap '' CHLD"; it knows only signal numbers.
|
||||
sig=`"$abs_top_builddir/src/kill" -l CHLD 2>/dev/null` && trap '' $sig
|
||||
|
||||
# Before 2004-04-21, install would infloop, in the `while (wait...' loop:
|
||||
# Before 2004-04-21, install would infloop, in the 'while (wait...' loop:
|
||||
exec ginstall -s "$abs_top_builddir/src/ginstall$EXEEXT" .
|
||||
)
|
||||
|
||||
|
@ -24,7 +24,7 @@ touch f || framework_failure_
|
||||
|
||||
ln --backup f f 2> out && fail=1
|
||||
cat <<\EOF > exp || fail=1
|
||||
ln: `f' and `f' are the same file
|
||||
ln: 'f' and 'f' are the same file
|
||||
EOF
|
||||
|
||||
compare exp out || fail=1
|
||||
|
@ -53,7 +53,7 @@ esac
|
||||
ln -s /no-such-dir || framework_failure_
|
||||
ln -L no-such-dir hard-to-dangle 2>err && fail=1
|
||||
case `cat err` in
|
||||
*' accessing `no-such-dir'\':*) ;;
|
||||
*' accessing 'no-such-dir'\':*) ;;
|
||||
*) fail=1 ;;
|
||||
esac
|
||||
ln -P no-such-dir hard-to-dangle || fail=1
|
||||
@ -64,12 +64,12 @@ mkdir d || framework_failure_
|
||||
ln -s d link-to-dir || framework_failure_
|
||||
ln -L link-to-dir hard-to-dir-link 2>err && fail=1
|
||||
case `cat err` in
|
||||
*': `link-to-dir'\'': hard link not allowed for directory'*) ;;
|
||||
*': 'link-to-dir'\'': hard link not allowed for directory'*) ;;
|
||||
*) fail=1 ;;
|
||||
esac
|
||||
ln -P link-to-dir/ hard-to-dir-link 2>err && fail=1
|
||||
case `cat err` in
|
||||
*': `link-to-dir/'\'': hard link not allowed for directory'*) ;;
|
||||
*': 'link-to-dir/'\'': hard link not allowed for directory'*) ;;
|
||||
*) fail=1 ;;
|
||||
esac
|
||||
ln -P link-to-dir hard-to-dir-link || fail=1
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
# Before coreutils-4.5.3, --target-dir didn't work with one file.
|
||||
# It would create the desired link, but would fail with a diagnosis like this:
|
||||
# ln: `d/.': cannot overwrite directory
|
||||
# ln: 'd/.': cannot overwrite directory
|
||||
# Based on a test case from Dmitry V. Levin.
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
|
@ -26,7 +26,7 @@ ln -s link link || framework_failure_
|
||||
ln -s ../../dir1 sub/link-to-dir || framework_failure_
|
||||
|
||||
# Make sure the symlink was created.
|
||||
# `ln -s link link' succeeds, but creates no file on
|
||||
# 'ln -s link link' succeeds, but creates no file on
|
||||
# systems running some DJGPP-2.03 libc.
|
||||
ls -F link > /dev/null || framework_failure_
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# make sure ls and `ls -R' do the right thing when invoked with no arguments.
|
||||
# make sure ls and 'ls -R' do the right thing when invoked with no arguments.
|
||||
|
||||
# Copyright (C) 2001, 2003-2004, 2006-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -24,7 +24,7 @@ ln -s dir symlink || framework_failure_
|
||||
|
||||
set `ls -l symlink/`
|
||||
|
||||
# Prior to fileutils-4.0k, the following would have output `... symlink -> dir'.
|
||||
# Prior to fileutils-4.0k, the following would have output '... symlink -> dir'.
|
||||
test "$*" = 'total 0' && : || fail=1
|
||||
|
||||
Exit $fail
|
||||
|
@ -23,13 +23,13 @@ ls -l --time-style=XX > out 2> err
|
||||
test $? = 2 || fail=1
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
ls: invalid argument `XX' for `time style'
|
||||
ls: invalid argument 'XX' for 'time style'
|
||||
Valid arguments are:
|
||||
- [posix-]full-iso
|
||||
- [posix-]long-iso
|
||||
- [posix-]iso
|
||||
- [posix-]locale
|
||||
- +FORMAT (e.g., +%H:%M) for a `date'-style format
|
||||
- +FORMAT (e.g., +%H:%M) for a 'date'-style format
|
||||
Try 'ls --help' for more information.
|
||||
EOF
|
||||
|
||||
|
@ -59,7 +59,7 @@ my @Tests =
|
||||
['10', qw(fs/ s/), {OUT => 'fs'}],
|
||||
);
|
||||
|
||||
# Append a newline to end of each expected `OUT' string.
|
||||
# Append a newline to end of each expected 'OUT' string.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ EOF
|
||||
compare exp out || fail=1
|
||||
|
||||
chcon --verbose -u$u1 f > out || fail=1
|
||||
echo 'changing security context of `f'\' > exp
|
||||
echo 'changing security context of 'f'\' > exp
|
||||
compare exp out || fail=1
|
||||
|
||||
Exit $fail
|
||||
|
@ -48,7 +48,7 @@ EOF
|
||||
compare exp out || fail=1
|
||||
rm -f in out exp
|
||||
|
||||
# `echo |csplit - 1 1' used to abort.
|
||||
# 'echo |csplit - 1 1' used to abort.
|
||||
echo > in
|
||||
csplit in 1 1 > out 2> err || fail=1
|
||||
cat <<EOF > exp
|
||||
@ -58,12 +58,12 @@ cat <<EOF > exp
|
||||
EOF
|
||||
compare exp out || fail=1
|
||||
cat <<\EOF > experr
|
||||
csplit: warning: line number `1' is the same as preceding line number
|
||||
csplit: warning: line number '1' is the same as preceding line number
|
||||
EOF
|
||||
compare experr err || fail=1
|
||||
rm -f in out exp err experr
|
||||
|
||||
# `echo | csplit -b '%0#6.3x' - 1' incorrectly warned about the format
|
||||
# 'echo | csplit -b '%0#6.3x' - 1' incorrectly warned about the format
|
||||
# up through coreutils 8.6.
|
||||
echo > in
|
||||
csplit -b '%0#6.3x' in 1 > out 2> err || fail=1
|
||||
@ -78,16 +78,16 @@ compare 'xx 000' experr || fail=1
|
||||
compare 'xx 0x001' in || fail=1
|
||||
rm -f in out exp err experr xx*
|
||||
|
||||
# make sure `csplit FILE 0' fails.
|
||||
# make sure 'csplit FILE 0' fails.
|
||||
echo > in
|
||||
csplit in 0 > out 2> err && fail=1
|
||||
csplit in 2 1 > out 2>> err && fail=1
|
||||
csplit in 3 3 > out 2>> err && fail=1
|
||||
cat <<\EOF > experr
|
||||
csplit: 0: line number must be greater than zero
|
||||
csplit: line number `1' is smaller than preceding line number, 2
|
||||
csplit: warning: line number `3' is the same as preceding line number
|
||||
csplit: `3': line number out of range
|
||||
csplit: line number '1' is smaller than preceding line number, 2
|
||||
csplit: warning: line number '3' is the same as preceding line number
|
||||
csplit: '3': line number out of range
|
||||
EOF
|
||||
compare experr err || fail=1
|
||||
|
||||
|
@ -123,13 +123,13 @@ my @Tests =
|
||||
# A totally overlapped field shouldn't change anything:
|
||||
['out-delim2', '-c1-3,2,5-', '--output-d=:', {IN=>"abcdefg\n"},
|
||||
{OUT=>"abc:efg\n"}],
|
||||
# Partial overlap: index `2' is not at the start of a range.
|
||||
# Partial overlap: index '2' is not at the start of a range.
|
||||
['out-delim3', '-c1-3,2-4,6', '--output-d=:', {IN=>"abcdefg\n"},
|
||||
{OUT=>"abcd:f\n"}],
|
||||
['out-delim3a', '-c1-3,2-4,6-', '--output-d=:', {IN=>"abcdefg\n"},
|
||||
{OUT=>"abcd:fg\n"}],
|
||||
# Ensure that the following two commands produce the same output.
|
||||
# Before an off-by-1 fix, the output from the former would not contain a `:'.
|
||||
# Before an off-by-1 fix, the output from the former would not contain a ':'.
|
||||
['out-delim4', '-c4-,2-3', '--output-d=:',
|
||||
{IN=>"abcdefg\n"}, {OUT=>"bc:defg\n"}],
|
||||
['out-delim5', '-c2-3,4-', '--output-d=:',
|
||||
|
@ -227,9 +227,9 @@ my @Tests =
|
||||
|
||||
['tz-5', '+%:z', {OUT=>"-00:01"}, {ENV=>'TZ=XXX0:01'}],
|
||||
|
||||
# Accept %:z with a field width before the `:'.
|
||||
# Accept %:z with a field width before the ':'.
|
||||
['tz-5w','+%8:z', {OUT=>"-0000:01"}, {ENV=>'TZ=XXX0:01'}],
|
||||
# Don't recognize %:z with a field width between the `:' and the `z'.
|
||||
# Don't recognize %:z with a field width between the ':' and the 'z'.
|
||||
['tz-5wf', '+%:8z', {OUT=>"%:8z"}, {ENV=>'TZ=XXX0:01'}],
|
||||
|
||||
['ns-relative',
|
||||
@ -242,7 +242,7 @@ my @Tests =
|
||||
|
||||
# Since coreutils/lib/getdate.y revision 1.96 (post-coreutils-5.3.0),
|
||||
# a command like the following would mistakenly exit nonzero with an
|
||||
# `invalid date ...' diagnostic, but when run in a time zone for
|
||||
# 'invalid date ...' diagnostic, but when run in a time zone for
|
||||
# which daylight savings time is in effect for the starting date.
|
||||
# Unfortunately (for ease of testing), if you set TZ at all, this
|
||||
# failure is not triggered, hence the removal of TZ from the environment.
|
||||
@ -266,7 +266,7 @@ my @Tests =
|
||||
# you get on a system with 32-bit time_t is not the same as
|
||||
# the one you get for a system where it's 64 bits wide:
|
||||
# - date: time 72057594037927935 is out of range
|
||||
# + date: invalid date `@72057594037927935'
|
||||
# + date: invalid date '@72057594037927935'
|
||||
{ERR_SUBST => 's/.*//'},
|
||||
{ERR => "\n"},
|
||||
{EXIT => 1},
|
||||
|
@ -25,11 +25,11 @@ print_ver_ date
|
||||
|
||||
# It would be easier simply to sleep for two seconds between two runs
|
||||
# of `date --date="21:04 +0100" +%S` and ensure that both outputs
|
||||
# are `00', but I prefer not to sleep unconditionally. `make check'
|
||||
# are '00', but I prefer not to sleep unconditionally. 'make check'
|
||||
# takes long enough as it is.
|
||||
|
||||
n=0
|
||||
# See if the current number of seconds is `00' or just before.
|
||||
# See if the current number of seconds is '00' or just before.
|
||||
s=`date +%S`
|
||||
case "$s" in
|
||||
58) n=3;;
|
||||
|
@ -53,7 +53,7 @@ my @Tests =
|
||||
['m', qw(''), {OUT => '.'}],
|
||||
);
|
||||
|
||||
# Append a newline to end of each expected `OUT' string.
|
||||
# Append a newline to end of each expected 'OUT' string.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ my @Tests =
|
||||
['paren4', '9 / \( \( 100 % 6 \) - 8 \)', {OUT => '-2'}],
|
||||
['paren5', '9 + \( 100 % 6 \)', {OUT => '13'}],
|
||||
|
||||
# Before 2.0.12, this would output `1'.
|
||||
# Before 2.0.12, this would output '1'.
|
||||
['0bang', '00 \< 0!', {OUT => '0'}, {EXIT => 1}],
|
||||
|
||||
# In 5.1.3 and earlier, these would exit with status 0.
|
||||
@ -69,7 +69,7 @@ my @Tests =
|
||||
['orempty', '"" \| ""', {OUT => '0'}, {EXIT => 1}],
|
||||
|
||||
|
||||
# This erroneously succeeded and output `3' before 2.0.12.
|
||||
# This erroneously succeeded and output '3' before 2.0.12.
|
||||
['fail-a', '3 + -', {ERR => "$prog: non-integer argument\n"},
|
||||
{EXIT => 2}],
|
||||
|
||||
@ -174,7 +174,7 @@ my @Tests =
|
||||
`expr $big_prod '*' $big_prod '*' $big_prod`
|
||||
or @Tests = grep {$_->[0] !~ /^bignum-/} @Tests;
|
||||
|
||||
# Append a newline to end of each expected `OUT' string.
|
||||
# Append a newline to end of each expected 'OUT' string.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ my @Tests =
|
||||
);
|
||||
|
||||
# Prepend the command line argument and append a newline to end
|
||||
# of each expected `OUT' string.
|
||||
# of each expected 'OUT' string.
|
||||
my $t;
|
||||
|
||||
Test:
|
||||
|
@ -74,7 +74,7 @@ test "x$v" = "x$VERSION" \
|
||||
for lang in C fr da; do
|
||||
for i in $built_programs; do
|
||||
|
||||
# Skip `test'; it doesn't accept --help or --version.
|
||||
# Skip 'test'; it doesn't accept --help or --version.
|
||||
test $i = test && continue;
|
||||
|
||||
# false fails even when invoked with --help or --version.
|
||||
@ -84,7 +84,7 @@ for lang in C fr da; do
|
||||
continue
|
||||
fi
|
||||
|
||||
# The just-built install executable is always named `ginstall'.
|
||||
# The just-built install executable is always named 'ginstall'.
|
||||
test $i = install && i=ginstall
|
||||
|
||||
# Make sure they exit successfully, under normal conditions.
|
||||
@ -95,7 +95,7 @@ for lang in C fr da; do
|
||||
grep "$PACKAGE_BUGREPORT" h-$i > /dev/null || fail=1
|
||||
rm -f h-$i
|
||||
|
||||
# Make sure they fail upon `disk full' error.
|
||||
# Make sure they fail upon 'disk full' error.
|
||||
if test -w /dev/full && test -c /dev/full; then
|
||||
env $i --help >/dev/full 2>/dev/null && fail=1
|
||||
env $i --version >/dev/full 2>/dev/null && fail=1
|
||||
@ -139,7 +139,7 @@ chown_setup () { args=--version; }
|
||||
mkfifo_setup () { args=--version; }
|
||||
mknod_setup () { args=--version; }
|
||||
# Punt on uptime, since it fails (e.g., failing to get boot time)
|
||||
# on some systems, and we shouldn't let that stop `make check'.
|
||||
# on some systems, and we shouldn't let that stop 'make check'.
|
||||
uptime_setup () { args=--version; }
|
||||
|
||||
# Create a file in the current directory, not in $TMPDIR.
|
||||
@ -198,7 +198,7 @@ basename_setup () { args=$tmp_in; }
|
||||
dirname_setup () { args=$tmp_in; }
|
||||
expr_setup () { args=foo; }
|
||||
|
||||
# Punt, in case GNU `id' hasn't been installed yet.
|
||||
# Punt, in case GNU 'id' hasn't been installed yet.
|
||||
groups_setup () { args=--version; }
|
||||
|
||||
pathchk_setup () { args=$tmp_in; }
|
||||
|
@ -145,7 +145,7 @@ my @Tests =
|
||||
['emptydir-x2', 'd d', {OUT => "d:\n\nd:\n"}, $mkdir, $rmdir],
|
||||
['emptydir-R', '-R d', {OUT => "d:\n"}, $mkdir, $rmdir],
|
||||
|
||||
# test `ls -R .' ............................................
|
||||
# test 'ls -R .' ............................................
|
||||
['R-dot', '--ignore="[a-ce-zA-Z]*" -R .', {OUT => ".:\nd\n\n\./d:\n"},
|
||||
$mkdir, $rmdir],
|
||||
|
||||
|
@ -112,8 +112,8 @@ and for tmpfs file systems on Solaris 5.5.1.
|
||||
It is also expected to fail on a btrfs file system until
|
||||
http://bugzilla.redhat.com/591068 is addressed.
|
||||
|
||||
In the output below, `c' should have had a ctime more recent than
|
||||
that of `a', but does not.
|
||||
In the output below, 'c' should have had a ctime more recent than
|
||||
that of 'a', but does not.
|
||||
EOF
|
||||
#'
|
||||
ls -ctl --full-time a c
|
||||
|
@ -129,7 +129,7 @@ my @Tests =
|
||||
{ERR=> "$prog: h: no properly formatted MD5 checksum lines found\n"}],
|
||||
);
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# make sure `md5sum -c' works for alternate BSD format (md5 -r)
|
||||
# make sure 'md5sum -c' works for alternate BSD format (md5 -r)
|
||||
|
||||
# Copyright (C) 2011-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -44,7 +44,7 @@ NA LAST NA
|
||||
'
|
||||
set $tests
|
||||
|
||||
# Require that this test be run at `nice' level 0.
|
||||
# Require that this test be run at 'nice' level 0.
|
||||
niceness=`nice`
|
||||
if test "$niceness" = 0; then
|
||||
: ok
|
||||
|
@ -27,9 +27,9 @@ nohup sh -c 'echo stdout; echo stderr 1>&2' 2>err || fail=1
|
||||
if test -t 1; then
|
||||
test "`cat nohup.out`" = stdout || fail=1
|
||||
if test -t 0; then
|
||||
echo 'nohup: ignoring input and appending output to `nohup.out'\'
|
||||
echo 'nohup: ignoring input and appending output to 'nohup.out'\'
|
||||
else
|
||||
echo 'nohup: appending output to `nohup.out'\'
|
||||
echo 'nohup: appending output to 'nohup.out'\'
|
||||
fi >exp || fail=1
|
||||
else
|
||||
# Here it should not even exist.
|
||||
@ -85,8 +85,8 @@ if test -t 1; then
|
||||
fi
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
nohup: appending output to `nohup.out'
|
||||
nohup: cannot run command `no-such-command': No such file or directory
|
||||
nohup: appending output to 'nohup.out'
|
||||
nohup: cannot run command 'no-such-command': No such file or directory
|
||||
EOF
|
||||
# Disable these comparisons. Too much variation in 2nd line.
|
||||
# compare exp err || fail=1
|
||||
@ -105,8 +105,8 @@ if test -t 1; then
|
||||
fi
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
nohup: appending output to `nohup.out'
|
||||
nohup: cannot run command `./k': Permission denied
|
||||
nohup: appending output to 'nohup.out'
|
||||
nohup: cannot run command './k': Permission denied
|
||||
EOF
|
||||
# Disable these comparisons. Too much variation in 2nd line.
|
||||
# compare exp err || fail=1
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Verify that `od -N N' reads no more than N bytes of input.
|
||||
# Verify that 'od -N N' reads no more than N bytes of input.
|
||||
|
||||
# Copyright (C) 2001, 2004-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -27,7 +27,7 @@ getlimits_
|
||||
# Verify the 3 methods of specifying "Escape":
|
||||
test $($prog "\x1b\n\33\n\e\n" | uniq -u) && fail=1
|
||||
|
||||
# This would fail (by printing the `--') for printf in sh-utils
|
||||
# This would fail (by printing the '--') for printf in sh-utils
|
||||
# and in coreutils 4.5.1.
|
||||
$prog -- 'foo\n' > out || fail=1
|
||||
cat <<\EOF > exp
|
||||
@ -53,13 +53,13 @@ POSIXLY_CORRECT=1 \
|
||||
$prog '4 \x40\n' >> out || fail=1
|
||||
$prog '5 % +d\n' 234 >> out || fail=1
|
||||
|
||||
# This should print "6 !\n", but don't rely on `!' being the
|
||||
# This should print "6 !\n", but don't rely on '!' being the
|
||||
# one-byte representation of octal 041. With printf prior to
|
||||
# coreutils-5.0.1, it would print six bytes: "6 \41\n".
|
||||
$prog '6 \41\n' | tr '\41' '!' >> out
|
||||
|
||||
# Note that as of coreutils-5.0.1, printf with a format of '\0002x'
|
||||
# prints a NUL byte followed by the digit `2' and an `x'.
|
||||
# prints a NUL byte followed by the digit '2' and an 'x'.
|
||||
# By contrast bash's printf outputs the same thing as $(printf '\2x') does.
|
||||
$prog '7 \2y \02y \002y \0002y\n' |tr '\0\2' '*=' >> out
|
||||
|
||||
|
@ -76,7 +76,7 @@ my @Tests =
|
||||
{ERR=> "$prog: z: no properly formatted SHA1 checksum lines found\n"}],
|
||||
);
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -522,7 +522,7 @@ foreach $t (@Tests)
|
||||
my $h = $t->[2];
|
||||
$h->{OUT} = lc $h->{OUT} . " f\n";
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
splice @$t, 1, 0, '--text';
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ my @Tests =
|
||||
{OUT=>"20794655980c91d8bbb4c1ea97618a4bf03f42581948b2ee4ee7ad67 f\n"}],
|
||||
);
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ my @Tests =
|
||||
{OUT=>"cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 f\n"}],
|
||||
);
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ my @Tests =
|
||||
{OUT=>"9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b07b8b3dc38ecc4ebae97ddd87f3d8985 f\n"}],
|
||||
);
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ my @Tests =
|
||||
{OUT=>"e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b f\n"}],
|
||||
);
|
||||
|
||||
# Insert the `--text' argument for each test.
|
||||
# Insert the '--text' argument for each test.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
|
@ -156,10 +156,10 @@ my @Tests =
|
||||
["07l", '-s +0 -1.2', {IN=>"a c\na b\n"}, {OUT=>"a b\na c\n"}],
|
||||
["07m", '-s +0 -1.1b', {IN=>"a c\na b\n"}, {OUT=>"a b\na c\n"}],
|
||||
#
|
||||
# report an error for `.' without following char spec
|
||||
# report an error for '.' without following char spec
|
||||
["08a", '-k 2.,3', {EXIT=>2},
|
||||
{ERR=>"$prog: invalid number after `.': invalid count at start of `,3'\n"}],
|
||||
# report an error for `,' without following POS2
|
||||
# report an error for ',' without following POS2
|
||||
["08b", '-k 2,', {EXIT=>2},
|
||||
{ERR=>"$prog: invalid number after `,': invalid count at start of `'\n"}],
|
||||
#
|
||||
@ -172,12 +172,12 @@ my @Tests =
|
||||
#
|
||||
# Bug reported by Roger Peel <R.Peel@ee.surrey.ac.uk>
|
||||
["10a", '-t : -k 2.2,2.2', {IN=>":ba\n:ab\n"}, {OUT=>":ba\n:ab\n"}],
|
||||
# Equivalent to above, but using obsolescent `+pos -pos' option syntax.
|
||||
# Equivalent to above, but using obsolescent '+pos -pos' option syntax.
|
||||
["10b", '-t : +1.1 -1.2', {IN=>":ba\n:ab\n"}, {OUT=>":ba\n:ab\n"}],
|
||||
#
|
||||
# The same as the preceding two, but with input lines reversed.
|
||||
["10c", '-t : -k 2.2,2.2', {IN=>":ab\n:ba\n"}, {OUT=>":ba\n:ab\n"}],
|
||||
# Equivalent to above, but using obsolescent `+pos -pos' option syntax.
|
||||
# Equivalent to above, but using obsolescent '+pos -pos' option syntax.
|
||||
["10d", '-t : +1.1 -1.2', {IN=>":ab\n:ba\n"}, {OUT=>":ba\n:ab\n"}],
|
||||
# Try without -t...
|
||||
# But note that we have to count the delimiting space at the beginning
|
||||
@ -205,10 +205,10 @@ my @Tests =
|
||||
# and the second key spec isn't even used.
|
||||
["11d", '-t: -k2,2b -k3,3', {IN=>"z:a :b\na\t:a\n"}, {OUT=>"a\t:a\nz:a :b\n"}],
|
||||
#
|
||||
# Exercise bug re comparing `-' and integers.
|
||||
# Exercise bug re comparing '-' and integers.
|
||||
["12a", '-n -t: +1', {IN=>"a:1\nb:-\n"}, {OUT=>"b:-\na:1\n"}],
|
||||
["12b", '-n -t: +1', {IN=>"b:-\na:1\n"}, {OUT=>"b:-\na:1\n"}],
|
||||
# Try some other (e.g. `X') invalid character.
|
||||
# Try some other (e.g. 'X') invalid character.
|
||||
["12c", '-n -t: +1', {IN=>"a:1\nb:X\n"}, {OUT=>"b:X\na:1\n"}],
|
||||
["12d", '-n -t: +1', {IN=>"b:X\na:1\n"}, {OUT=>"b:X\na:1\n"}],
|
||||
# From Karl Heuer
|
||||
@ -236,22 +236,22 @@ my @Tests =
|
||||
# of sort from textutils-1.19p and before.
|
||||
["17", '-c', {IN=>"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"}],
|
||||
|
||||
# POSIX says -n no longer implies -b, so here we're comparing ` 9' and `10'.
|
||||
# POSIX says -n no longer implies -b, so here we're comparing ' 9' and '10'.
|
||||
["18a", '-k1.1,1.2n', {IN=>" 901\n100\n"}, {OUT=>" 901\n100\n"}],
|
||||
|
||||
# Just like above, because the global `-b' has no effect on the
|
||||
# key specifier when a key-specific option (`n' in this case) is used.
|
||||
# Just like above, because the global '-b' has no effect on the
|
||||
# key specifier when a key-specific option ('n' in this case) is used.
|
||||
["18b", '-b -k1.1,1.2n', {IN=>" 901\n100\n"}, {OUT=>" 901\n100\n"}],
|
||||
|
||||
# Here we're comparing ` 90' and `10', because the `b' on the key-end specifier
|
||||
# Here we're comparing ' 90' and '10', because the 'b' on the key-end specifier
|
||||
# makes sort ignore leading blanks when determining that key's *end*.
|
||||
["18c", '-k1.1,1.2nb', {IN=>" 901\n100\n"}, {OUT=>"100\n 901\n"}],
|
||||
|
||||
# Here we're comparing `9' and `10', because the `b' on the key-start specifier
|
||||
# Here we're comparing '9' and '10', because the 'b' on the key-start specifier
|
||||
# makes sort ignore leading blanks when determining that key's *start*.
|
||||
["18d", '-k1.1b,1.2n', {IN=>" 901\n100\n"}, {OUT=>" 901\n100\n"}],
|
||||
|
||||
# This compares `90' and `10', as it ignores leading blanks for both
|
||||
# This compares '90' and '10', as it ignores leading blanks for both
|
||||
# key start and key end.
|
||||
["18e", '-nb -k1.1,1.2', {IN=>" 901\n100\n"}, {OUT=>"100\n 901\n"}],
|
||||
|
||||
@ -289,7 +289,7 @@ my @Tests =
|
||||
|
||||
# Demonstrate that folding changes the ordering of e.g. A, a, and _
|
||||
# because while they normally (in the C locale) collate like A, _, a,
|
||||
# when using -f, `a' is compared as if it were `A'.
|
||||
# when using -f, 'a' is compared as if it were 'A'.
|
||||
["21a", '', {IN=>"A\na\n_\n"}, {OUT=>"A\n_\na\n"}],
|
||||
["21b", '-f', {IN=>"A\na\n_\n"}, {OUT=>"A\na\n_\n"}],
|
||||
["21c", '-f', {IN=>"a\nA\n_\n"}, {OUT=>"A\na\n_\n"}],
|
||||
|
@ -35,7 +35,7 @@ EOF
|
||||
|
||||
chmod +x gzip
|
||||
|
||||
# Ensure `sort` is immune to parent's SIGCHLD handler
|
||||
# Ensure 'sort` is immune to parent's SIGCHLD handler
|
||||
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
|
||||
(
|
||||
# ash doesn't support "trap '' CHLD"; it knows only signal numbers.
|
||||
|
@ -27,27 +27,27 @@ sort: key 1 has zero width and will be ignored
|
||||
sort: using simple byte comparison
|
||||
sort: key 1 is numeric and spans multiple fields
|
||||
sort: using simple byte comparison
|
||||
sort: options `-bghMRrV' are ignored
|
||||
sort: options '-bghMRrV' are ignored
|
||||
sort: using simple byte comparison
|
||||
sort: options `-bghMRV' are ignored
|
||||
sort: option `-r' only applies to last-resort comparison
|
||||
sort: options '-bghMRV' are ignored
|
||||
sort: option '-r' only applies to last-resort comparison
|
||||
sort: using simple byte comparison
|
||||
sort: option `-r' only applies to last-resort comparison
|
||||
sort: option '-r' only applies to last-resort comparison
|
||||
sort: using simple byte comparison
|
||||
sort: options `-bg' are ignored
|
||||
sort: options '-bg' are ignored
|
||||
sort: using simple byte comparison
|
||||
sort: using simple byte comparison
|
||||
sort: option `-b' is ignored
|
||||
sort: option '-b' is ignored
|
||||
sort: using simple byte comparison
|
||||
sort: using simple byte comparison
|
||||
sort: using simple byte comparison
|
||||
sort: leading blanks are significant in key 1; consider also specifying `b'
|
||||
sort: leading blanks are significant in key 1; consider also specifying 'b'
|
||||
sort: using simple byte comparison
|
||||
sort: leading blanks are significant in key 1; consider also specifying `b'
|
||||
sort: option `-d' is ignored
|
||||
sort: leading blanks are significant in key 1; consider also specifying 'b'
|
||||
sort: option '-d' is ignored
|
||||
sort: using simple byte comparison
|
||||
sort: leading blanks are significant in key 1; consider also specifying `b'
|
||||
sort: option `-i' is ignored
|
||||
sort: leading blanks are significant in key 1; consider also specifying 'b'
|
||||
sort: option '-i' is ignored
|
||||
sort: using simple byte comparison
|
||||
sort: using simple byte comparison
|
||||
sort: using simple byte comparison
|
||||
@ -76,11 +76,11 @@ compare exp out || fail=1
|
||||
cat <<\EOF > exp
|
||||
sort: using simple byte comparison
|
||||
sort: key 1 is numeric and spans multiple fields
|
||||
sort: obsolescent key `+2 -1' used; consider `-k 3,1' instead
|
||||
sort: obsolescent key '+2 -1' used; consider '-k 3,1' instead
|
||||
sort: key 2 has zero width and will be ignored
|
||||
sort: leading blanks are significant in key 2; consider also specifying `b'
|
||||
sort: option `-b' is ignored
|
||||
sort: option `-r' only applies to last-resort comparison
|
||||
sort: leading blanks are significant in key 2; consider also specifying 'b'
|
||||
sort: option '-b' is ignored
|
||||
sort: option '-r' only applies to last-resort comparison
|
||||
EOF
|
||||
|
||||
sort --debug -rb -k2n +2.2 -1b /dev/null 2>out
|
||||
|
@ -43,7 +43,7 @@ my @Tests =
|
||||
# input file name of '-'
|
||||
['minus-in-stdin', '--files0-from=-', '<', {IN=>{f=>'-'}}, {EXIT=>2},
|
||||
{ERR => "$prog: when reading file names from stdin, no file name of"
|
||||
. " `-' allowed\n"}],
|
||||
. " '-' allowed\n"}],
|
||||
|
||||
# empty input, regular file
|
||||
['empty', '--files0-from=@AUX@', {AUX=>''}, {EXIT=>2},
|
||||
@ -58,7 +58,7 @@ my @Tests =
|
||||
{ERR => "$prog: -:1: invalid zero-length file name\n"}],
|
||||
|
||||
# two NULs
|
||||
# Note that the behavior here differs from `wc' in that the
|
||||
# Note that the behavior here differs from 'wc' in that the
|
||||
# first zero-length file name is treated as fatal, so there
|
||||
# is only one line of diagnostic output.
|
||||
['nul-2', '--files0-from=-', '<', {IN=>"\0\0"}, {EXIT=>2},
|
||||
@ -81,7 +81,7 @@ my @Tests =
|
||||
{IN=>{f=>"g\0g\0"}}, {AUX=>{g=>'a'}}, {OUT=>"a\na\n"} ],
|
||||
|
||||
# Ensure that $prog does nothing when there is a zero-length filename.
|
||||
# Note that the behavior here differs from `wc' in that the
|
||||
# Note that the behavior here differs from 'wc' in that the
|
||||
# first zero-length file name is treated as fatal, so there
|
||||
# should be no output on STDOUT.
|
||||
['zero-len', '--files0-from=-', '<',
|
||||
|
@ -96,7 +96,7 @@ retry_delay_ stdbuf_unbuffer .1 6 || fail=1
|
||||
# One could remove the need for dd (used to close the fifo to get uniq to quit
|
||||
# early), if head -n1 read stdin char by char. Note uniq | head -c2 doesn't
|
||||
# suffice due to the buffering implicit in the pipe. sed currently does read
|
||||
# stdin char by char, so we can test with `sed 1q`. However I'm wary about
|
||||
# stdin char by char, so we can test with 'sed 1q`. However I'm wary about
|
||||
# adding this dependency on a program outside of coreutils.
|
||||
# printf '2\n' > exp
|
||||
# printf '1\n2\n' | (stdbuf -i0 sed 1q >/dev/null; cat) > out
|
||||
|
@ -56,9 +56,9 @@ stty -raw -a 2>/dev/null && fail=1
|
||||
sed_del='/^speed/d;/^rows/d;/^columns/d;/ = /d'
|
||||
options=`stty -a | tr -s ';' '\n' | sed "s/^ //;$sed_del;s/-//g"`
|
||||
|
||||
# Take them one at a time, with and without the leading `-'.
|
||||
# Take them one at a time, with and without the leading '-'.
|
||||
for opt in $options; do
|
||||
# `stty parenb' and `stty -parenb' fail with this message
|
||||
# 'stty parenb' and 'stty -parenb' fail with this message
|
||||
# stty: standard input: unable to perform all requested operations
|
||||
# on Linux 2.2.0-pre4 kernels. Also since around Linux 2.6.30
|
||||
# other serial control settings give the same error. So skip them.
|
||||
@ -68,7 +68,7 @@ for opt in $options; do
|
||||
|
||||
stty $opt || fail=1
|
||||
|
||||
# Likewise, `stty -cread' would fail, so skip that, too.
|
||||
# Likewise, 'stty -cread' would fail, so skip that, too.
|
||||
test $opt = cread && continue
|
||||
rev=`eval echo "\\\$REV_$opt"`
|
||||
if test -n "$rev"; then
|
||||
|
@ -16,7 +16,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Setting this envvar to a very small value used to cause e.g., `stty size'
|
||||
# Setting this envvar to a very small value used to cause e.g., 'stty size'
|
||||
# to generate slightly different output on certain systems.
|
||||
COLUMNS=80
|
||||
export COLUMNS
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# make sure `sum -s' works for input whose sum of bytes is larger than 2^32
|
||||
# make sure 'sum -s' works for input whose sum of bytes is larger than 2^32
|
||||
|
||||
# Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -39,7 +39,7 @@ my @tv = (
|
||||
['obs-plus-l4', '+1l', "x\ny\n", "x\ny\n", 0],
|
||||
['obs-plus-l5', '+2l', "x\ny\n", "y\n", 0],
|
||||
|
||||
# Same as -l tests, but without the `l'.
|
||||
# Same as -l tests, but without the 'l'.
|
||||
['obs-1', '-1', 'x', 'x', 0],
|
||||
['obs-2', '-1', "x\ny\n", "y\n", 0],
|
||||
['obs-3', '-1', "x\ny", "y", 0],
|
||||
@ -64,12 +64,12 @@ my @tv = (
|
||||
['err-3', '+2cz', '', '', 1,
|
||||
"$prog: cannot open `+2cz' for reading: No such file or directory\n"],
|
||||
|
||||
# This should get `tail: invalid option -- 2'
|
||||
# This should get 'tail: invalid option -- 2'
|
||||
['err-4', '-2cX', '', '', 1,
|
||||
"$prog: option used in invalid context -- 2\n"],
|
||||
|
||||
# Since the number is larger than 2^64, this should provoke
|
||||
# the diagnostic: `tail: 99999999999999999999: invalid number of bytes'
|
||||
# the diagnostic: 'tail: 99999999999999999999: invalid number of bytes'
|
||||
# on all systems... probably, for now, maybe.
|
||||
['err-5', '-c99999999999999999999', '', '', 1,
|
||||
"$prog: 99999999999999999999: invalid number of bytes\n"],
|
||||
|
@ -68,7 +68,7 @@ sub add_inverse_op_tests($)
|
||||
my ($flags, $ret, $LoH) = digest_test $t;
|
||||
|
||||
# Generate corresponding tests of inverse ops.
|
||||
# E.g. generate tests of `-ge' from those of `-lt'.
|
||||
# E.g. generate tests of '-ge' from those of '-lt'.
|
||||
foreach my $op (qw(gt lt eq))
|
||||
{
|
||||
if ($test_name =~ /$op-/ && $flags =~ / -$op /)
|
||||
|
@ -42,7 +42,7 @@ test $? = 124 || fail=1
|
||||
timeout -s0 -k1 1 sleep 10
|
||||
test $? = 124 && fail=1
|
||||
|
||||
# Ensure `timeout` is immune to parent's SIGCHLD handler
|
||||
# Ensure 'timeout` is immune to parent's SIGCHLD handler
|
||||
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
|
||||
(
|
||||
# ash doesn't support "trap '' CHLD"; it knows only signal numbers.
|
||||
|
@ -43,7 +43,7 @@ my @Tests =
|
||||
# input file name of '-'
|
||||
['minus-in-stdin', '--files0-from=-', '<', {IN=>{f=>'-'}}, {EXIT=>1},
|
||||
{ERR => "$prog: when reading file names from stdin, no file name of"
|
||||
. " `-' allowed\n"}],
|
||||
. " '-' allowed\n"}],
|
||||
|
||||
# empty input, regular file
|
||||
['empty', '--files0-from=@AUX@', {AUX=>''}],
|
||||
|
@ -22,11 +22,11 @@ print_ver_ mkdir
|
||||
mkdir -pv foo/a/b/c/d >out || fail=1
|
||||
|
||||
compare - out <<\EOF
|
||||
mkdir: created directory `foo'
|
||||
mkdir: created directory `foo/a'
|
||||
mkdir: created directory `foo/a/b'
|
||||
mkdir: created directory `foo/a/b/c'
|
||||
mkdir: created directory `foo/a/b/c/d'
|
||||
mkdir: created directory 'foo'
|
||||
mkdir: created directory 'foo/a'
|
||||
mkdir: created directory 'foo/a/b'
|
||||
mkdir: created directory 'foo/a/b/c'
|
||||
mkdir: created directory 'foo/a/b/c/d'
|
||||
EOF
|
||||
|
||||
Exit $fail
|
||||
|
@ -23,8 +23,8 @@ skip_if_setgid_
|
||||
mkdir -m 700 e-dir || framework_failure_
|
||||
|
||||
|
||||
# Make sure `mkdir -p existing-dir' succeeds
|
||||
# and that `mkdir existing-dir' fails.
|
||||
# Make sure 'mkdir -p existing-dir' succeeds
|
||||
# and that 'mkdir existing-dir' fails.
|
||||
mkdir -p e-dir || fail=1
|
||||
mkdir e-dir > /dev/null 2>&1 && fail=1
|
||||
|
||||
@ -34,18 +34,18 @@ mode_str=drwxr-x-wx
|
||||
mode_arg=`rwx_to_mode_ $mode_str`
|
||||
mkdir -m $mode_arg a || fail=1
|
||||
|
||||
# this `mkdir -p ...' shouldn't change perms of existing dir `a'.
|
||||
# this 'mkdir -p ...' shouldn't change perms of existing dir 'a'.
|
||||
d_mode_str=drwx-w--wx
|
||||
d_mode_arg=`rwx_to_mode_ $d_mode_str`
|
||||
mkdir -p -m $d_mode_arg a/b/c/d
|
||||
|
||||
# Make sure the permissions of `a' haven't been changed.
|
||||
# Make sure the permissions of 'a' haven't been changed.
|
||||
p=`ls -ld a|cut -b-10`; case $p in $mode_str);; *) fail=1;; esac
|
||||
# `b's and `c's should reflect the umask
|
||||
# 'b's and 'c's should reflect the umask
|
||||
p=`ls -ld a/b|cut -b-10`; case $p in drwx------);; *) fail=1;; esac
|
||||
p=`ls -ld a/b/c|cut -b-10`; case $p in drwx------);; *) fail=1;; esac
|
||||
|
||||
# `d's perms are determined by the -m argument.
|
||||
# 'd's perms are determined by the -m argument.
|
||||
p=`ls -ld a/b/c/d|cut -b-10`; case $p in $d_mode_str);; *) fail=1;; esac
|
||||
|
||||
Exit $fail
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Verify that mkdir's `-m MODE' option works properly
|
||||
# Verify that mkdir's '-m MODE' option works properly
|
||||
# with various umask settings.
|
||||
|
||||
# Copyright (C) 2000, 2002-2012 Free Software Foundation, Inc.
|
||||
|
@ -23,10 +23,10 @@ mkdir A B || framework_failure_
|
||||
touch X Y || framework_failure_
|
||||
|
||||
|
||||
# Before coreutils-6.2, the " (backup: `B.~1~')" suffix was not printed.
|
||||
# Before coreutils-6.2, the " (backup: 'B.~1~')" suffix was not printed.
|
||||
mv --verbose --backup=numbered -T A B > out || fail=1
|
||||
cat <<\EOF > exp || fail=1
|
||||
`A' -> `B' (backup: `B.~1~')
|
||||
'A' -> 'B' (backup: 'B.~1~')
|
||||
EOF
|
||||
|
||||
compare exp out || fail=1
|
||||
|
@ -38,7 +38,7 @@ sed \
|
||||
out > out2
|
||||
|
||||
cat > exp <<\EOF
|
||||
XXX: backing up `YYY' would destroy source; `ZZZ' not moved
|
||||
XXX: backing up 'YYY' would destroy source; 'ZZZ' not moved
|
||||
EOF
|
||||
|
||||
compare exp out2 || fail=1
|
||||
|
@ -37,10 +37,10 @@ mv --target=f2 f1 >> out 2>&1 && fail=1
|
||||
cat > exp <<\EOF
|
||||
mv: missing file operand
|
||||
Try 'mv --help' for more information.
|
||||
mv: missing destination file operand after `no-file'
|
||||
mv: missing destination file operand after 'no-file'
|
||||
Try 'mv --help' for more information.
|
||||
mv: target `f1' is not a directory
|
||||
mv: target `f2' is not a directory
|
||||
mv: target 'f1' is not a directory
|
||||
mv: target 'f2' is not a directory
|
||||
EOF
|
||||
|
||||
compare exp out || fail=1
|
||||
|
@ -34,7 +34,7 @@ sed 's/: File exists/: Directory not empty/'<out>o1;mv o1 out
|
||||
sed 's/: Device or resource busy/: Directory not empty/'<out>o1;mv o1 out
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
mv: cannot move `b/t' to `a/t': Directory not empty
|
||||
mv: cannot move 'b/t' to 'a/t': Directory not empty
|
||||
EOF
|
||||
|
||||
compare exp out || fail=1
|
||||
|
@ -37,7 +37,7 @@ for i in cp; do
|
||||
rm -fr a d; touch a; mkdir d
|
||||
$i --backup=numbered a a d/ 2>> out || fail=1
|
||||
|
||||
# But not with plain `--backup'
|
||||
# But not with plain '--backup'
|
||||
rm -fr a d; touch a; mkdir d
|
||||
$i --backup a a d/ 2>> out && fail=1
|
||||
cat <<EOF > exp
|
||||
|
@ -22,11 +22,11 @@
|
||||
# To exercise this bug is non-trivial:
|
||||
# Set-up requires at least three hard-linked files. In copying them,
|
||||
# while preserving links, the initial copy must succeed, the attempt
|
||||
# to create the second file via `link' must fail, and the final `link'
|
||||
# to create the second file via 'link' must fail, and the final 'link'
|
||||
# (to create the third) must succeed. Before the corresponding fix,
|
||||
# the first and third destination files would not be linked.
|
||||
#
|
||||
# Note that this is nominally a test of `cp', yet it is in the tests/mv
|
||||
# Note that this is nominally a test of 'cp', yet it is in the tests/mv
|
||||
# directory, because it requires use of the --preserve=link option that
|
||||
# mv enables by default.
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user