File: uutest-1

package info (click to toggle)
sharutils 1%3A4.9-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 6,272 kB
  • ctags: 4,029
  • sloc: ansic: 31,488; sh: 5,958; perl: 1,786; makefile: 610; pascal: 293; yacc: 291; sed: 16
file content (27 lines) | stat: -rwxr-xr-x 474 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh

trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="test.bin test.out"
# Make sure no files are left over.
rm -fr $tmpfiles

: ${UUDECODE=uudecode}
${UUDECODE} $top_srcdir/tests/testdata
result=$?

if test $result -eq 0; then
  : ${UUENCODE=uuencode}
  ${UUENCODE} test.bin test.bin > test.out
  result=$?

  if test $result -eq 0; then
    : ${DIFF=diff}
    ${DIFF} $top_srcdir/tests/testdata test.out > /dev/null
    result=$?
  fi
fi

rm -fr $tmpfiles

exit $result