File: toc.tst

package info (click to toggle)
a2ps 1:4.14-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 13,328 kB
  • sloc: ansic: 26,966; sh: 11,844; lex: 2,286; perl: 1,156; yacc: 757; makefile: 609; lisp: 398; ada: 263; objc: 189; f90: 109; ml: 85; sql: 74; pascal: 57; modula3: 33; haskell: 32; sed: 30; java: 29; python: 24
file content (36 lines) | stat: -rwxr-xr-x 988 bytes parent folder | download | duplicates (10)
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
32
33
34
35
36
#! /bin/sh
# -*- ksh -*-

: ${SRCDIR=.}
. $SRCDIR/defs || exit 1

## In this test, a2ps is called on the regular test files.
## This is because it happened that it crashed _only_ when
## printing several files.  Don't take all the content of
## test_files, because encoding.pre generates a super big
## prologue which is of no use here but wasting space.

# But it was dumb to lose so much time.  Now it makes sure that --toc
# in conjunction with --pages=toc is OK.  Actually, we use
# --pages=1,toc just to make sure :)

# The options to run with
OPT="-Eplain -Cmq2 --compact=no -a1,toc --toc=#{toc_test} -P awkout"

# Where are the test files
FILES=`echo $TEST_FILES | sed "s#\\([^ :]*\\):[^ ]*#$TST_DIR/\\1#g"`

# Checked and reference outputs
REF_FILE=$REF_DIR/toc.ps
CHK_FILE=$CHK_DIR/toc.ps

# Run the test
$CHK $OPT $FILES > $CHK_FILE 2>&5
if test -f $REF_FILE; then :; else
  $REF $OPT $FILES > $REF_FILE 2>&5
fi

# Return the verdict
cmp $REF_FILE $CHK_FILE 2>/dev/null

exit 0