* tests/sum/basic-1: Move this file to ...
* tests/misc/sum: ...here. Don't rely on $PROG in env.
* tests/sum/sysv: Move this file to ...
* tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh.
* tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
* tests/Makefile.am (SUBDIRS): Remove sum.
* tests/sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
tests/shred/Makefile
tests/sort/Makefile
tests/stty/Makefile
- tests/sum/Makefile
tests/tac/Makefile
tests/tail-2/Makefile
tests/tail/Makefile
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 sum tac tail tail-2 tee test touch tr \
+ sha1sum shred sort stty tac tail tail-2 tee test touch tr \
uniq wc
## N O T E :: Please do not add new directories.
split-l \
stat-fmt \
stat-printf \
+ sum \
+ sum-sysv \
tac-continue \
test-diag \
tsort \
#!/bin/sh
# Test "sum".
-# 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 = 'sum';
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
exit $fail;
EOF
#!/bin/sh
# make sure `sum -s' works for input whose sum of bytes is larger than 2^32
-# Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001-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
LC_ALL=C
export LC_ALL
-pwd=`pwd`
-tmp=sum-s.$$
-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' 1>&2
- (exit 1); exit 1
-fi
+. $srcdir/../test-lib.sh
fail=0
cat > exp <<\EOF
65535 32897
EOF
-cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+compare out exp || fail=1
rm -f out exp
cat > exp <<\EOF
254 32897
EOF
-cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+compare out exp || fail=1
(exit $fail); exit $fail
+++ /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=sum
-
-TESTS = basic-1 sysv