[go: up one dir, main page]

File: test-common

package info (click to toggle)
cppi 1.18-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,936 kB
  • sloc: ansic: 12,443; sh: 7,551; lex: 850; perl: 173; makefile: 47; sed: 16
file content (31 lines) | stat: -rw-r--r-- 661 bytes parent folder | download
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
28
29
30
31
if test "$redirect_stdin" = no; then
  cppi $options $t.I > $t.O 2> $t.e
else
  cppi $options - < $t.I > $t.O 2> $t.e
fi
status=$?

fail=0
if test $status != $expected_status; then
  echo "unexpected return status: got $status; expected $expected_status"
  fail=1
fi

if cmp -s $t.O $t.EO; then
  :
else
  echo "unexpected results on standard output"
  echo "compare the output files (expected actual): $t.EO $t.O"
  fail=1
fi

if cmp -s $t.e $t.Ee; then
  :
else
  echo "unexpected results on standard error"
  echo "compare the error files (expected actual): $t.Ee $t.e"
  fail=1
fi

test $fail = 0 && rm -f $t.I $t.O $t.e $t.EO $t.Ee $extra_temps
exit $fail