coreutils/tests/sample-test

39 lines
792 B
Plaintext
Raw Normal View History

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