1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-20 14:22:26 +02:00
Files
coreutils/tests/sample-test

39 lines
792 B
Plaintext
Raw Normal View History

2000-08-24 08:40:47 +00:00
#!/bin/sh
# FIXME
if test "$VERBOSE" = yes; then
set -x
FIXME --version
fi
2000-12-10 09:20:35 +00:00
# FIXME: . $srcdir/../envvar-check
# FIXME: . $srcdir/../lang-default
2001-09-02 15:19:27 +00:00
# FIXME: PRIV_CHECK_ARG=require-root . $srcdir/../priv-check
# FIXME: PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
2000-12-10 09:20:35 +00:00
2000-08-24 08:40:47 +00:00
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
2002-06-15 09:54:08 +00:00
trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
trap '(exit $?); exit $?' 1 2 13 15
2000-08-24 08:40:47 +00:00
framework_failure=0
mkdir -p $tmp || framework_failure=1
2000-08-24 08:40:47 +00:00
cd $tmp || framework_failure=1
if test $framework_failure = 1; then
2001-11-12 12:41:40 +00:00
echo '$0: failure in testing framework' 1>&2
(exit 1); exit 1
2000-08-24 08:40:47 +00:00
fi
fail=0
2001-11-03 21:44:36 +00:00
FIXME > out || fail=1
cat <<\EOF > exp
2001-08-04 15:16:37 +00:00
FIXME
2001-11-03 21:44:36 +00:00
EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
2000-08-24 08:40:47 +00:00
(exit $fail); exit $fail