.
[coreutils.git] / tests / sample-test
blob9cb755c55d330e7beca3e1dbf0f8cfd44d7d9453
1 #!/bin/sh
2 # FIXME
4 if test "$VERBOSE" = yes; then
5 set -x
6 FIXME --version
7 fi
9 # FIXME: . $srcdir/../envvar-check
10 # FIXME: . $srcdir/../lang-default
11 # FIXME: PRIV_CHECK_ARG=require-root . $srcdir/../priv-check
12 # FIXME: PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
14 pwd=`pwd`
15 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
16 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
17 trap '(exit $?); exit $?' 1 2 13 15
19 framework_failure=0
20 mkdir -p $tmp || framework_failure=1
21 cd $tmp || framework_failure=1
23 if test $framework_failure = 1; then
24 echo "$0: failure in testing framework" 1>&2
25 (exit 1); exit 1
28 fail=0
30 FIXME > out || fail=1
31 cat <<\EOF > exp
32 FIXME
33 EOF
35 cmp out exp || fail=1
36 test $fail = 1 && diff out exp 2> /dev/null
38 (exit $fail); exit $fail