^lib/group-member\.c$
^Makefile\.maint$
^doc/coreutils.texi$
-^tests/stty/invalid$
+^tests/misc/stty-invalid$
tests/misc/Makefile
tests/mkdir/Makefile
tests/mv/Makefile
- tests/od/Makefile
tests/pr/Makefile
tests/readlink/Makefile
tests/rm/Makefile
tests/rmdir/Makefile
- tests/sha1sum/Makefile
- tests/shred/Makefile
tests/sort/Makefile
- tests/stty/Makefile
tests/tac/Makefile
tests/tail-2/Makefile
tests/tail/Makefile
## There are too many already. Put new tests in misc/.
SUBDIRS = \
chgrp chmod chown cp cut dd du head \
- install join ln ls ls-2 misc mkdir mv od pr readlink rm rmdir \
- sha1sum shred sort stty tac tail tail-2 test touch tr \
+ install join ln ls ls-2 misc mkdir mv pr readlink rm rmdir \
+ sort tac tail tail-2 test touch tr \
uniq wc
## N O T E :: Please do not add new directories.
nice \
nl \
nohup \
+ od-N \
+ od-x8 \
paste-no-nl \
pathchk1 \
printf \
pwd-long \
runcon-no-reorder \
seq \
+ sha1sum \
+ sha1sum-vec \
sha224sum \
sha256sum \
sha384sum \
sha512sum \
+ shred-exact \
+ shred-remove \
shuf \
sort-compress \
sort-merge \
split-l \
stat-fmt \
stat-printf \
+ stty \
+ stty-invalid \
+ stty-row-col \
sum \
sum-sysv \
tac-continue \
tty-eof \
unexpand
+
include $(top_srcdir)/tests/check.mk
fail=1
fi
-cd ..
-rm -rf $tmp
-
exit $fail
#!/bin/sh
# Verify that `od -N N' reads no more than N bytes of input.
-# Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2005, 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
od --version
fi
-pwd=`pwd`
-tmp=od-N.$$
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
+. $srcdir/../test-lib.sh
-framework_failure=0
-mkdir $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-echo abcdefg > in || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework' 1>&2
- (exit 1); exit 1
-fi
+echo abcdefg > in || framework_failure
fail=0
a b c
d e f
EOF
-cmp out exp || {
- fail=1
- diff out exp 2> /dev/null
- }
+compare out exp || fail=1
(exit $fail); exit $fail
# verify that od -t x8 works properly
# This would fail before coreutils-4.5.2.
-# Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005-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
od --version
fi
+. $srcdir/../test-lib.sh
+
od -t x8 /dev/null >/dev/null || {
echo >&2 "$0: 8-byte test skipped"
exit 77
}
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-echo abcdefgh |tr -d '\n' > in || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+echo abcdefgh |tr -d '\n' > in || framework_failure
fail=0
| sort -n \
> exp
-cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+compare out exp || fail=1
(exit $fail); exit $fail
#!/bin/sh
# Test "sha1sum".
-# Copyright (C) 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2005-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
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};
-my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
+my $prog = 'sha1sum';
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
exit $fail;
EOF
#!/bin/sh
# Sample vectors for "sha1sum".
-# Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2005, 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
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};
-my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
+my $prog = 'sha1sum';
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
exit $fail;
EOF
#!/bin/sh
# make sure that neither --exact nor --zero gobbles a command line argument
-# Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 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
shred --version
fi
-pwd=`pwd`
-tmp=exact.$$
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
-
-framework_failure=0
-mkdir $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- (exit 1); exit 1
-fi
+. $srcdir/../test-lib.sh
fail=0
#!/bin/sh
# Exercise a bug that was fixed in shred-4.0l
-# Copyright (C) 1999, 2000, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 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
fi
PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
-
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
+. $srcdir/../test-lib.sh
# The length of the basename is what matters.
# In this case, shred would try to rename the file 256^10 times
# before terminating.
file=0123456789
-touch $file || framework_failure=1
-chmod u-w $file || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- exit 1
-fi
+touch $file || framework_failure
+chmod u-w $file || framework_failure
fail=0
#! /bin/sh
# Make sure stty can parse most of its options.
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free
-# Software Foundation, Inc.
+# Copyright (C) 1998-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
# Make sure there's a tty on stdin.
. $srcdir/../input-tty
+. $srcdir/../test-lib.sh
# The following list of reversible options was generated with
# grep -w REV stty.c|sed -n '/^ {"/{s//REV_/;s/".*/=1/;p;}'|fmt
fi
stty `cat $saved_state`
-rm -f $saved_state
exit $fail
# Make sure there's a tty on stdin.
. $srcdir/../input-tty
-
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+. $srcdir/../test-lib.sh
fail=0
#! /bin/sh
# Test "stty" with rows and columns.
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
-# Software Foundation, Inc.
+# Copyright (C) 1998-2001, 2003-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
# Make sure there's a tty on stdin.
. $srcdir/../input-tty
+. $srcdir/../test-lib.sh
# Versions of GNU stty from shellutils-1.9.2c and earlier failed
# tests #2 and #4 when run on SunOS 4.1.3.
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS_ENVIRONMENT = \
- top_srcdir=$(top_srcdir) \
- srcdir=$(srcdir) \
- PERL="$(PERL)" \
- CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
- PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
-
-TESTS = od-N x8
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS_ENVIRONMENT = \
- top_srcdir=$(top_srcdir) \
- srcdir=$(srcdir) \
- PERL="$(PERL)" \
- CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
- PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \
- PROG=sha1sum
-
-TESTS = basic-1 sample-vec
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS_ENVIRONMENT = \
- top_srcdir=$(top_srcdir) \
- srcdir=$(srcdir) \
- PERL="$(PERL)" \
- CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
- PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
-
-TESTS = remove exact
+++ /dev/null
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = invalid row-col-1 basic-1
-EXTRA_DIST = $(TESTS)
-TESTS_ENVIRONMENT = \
- CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
- PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"