File: align-1.tst

package info (click to toggle)
a2ps 1%3A4.14-1.1%2Bdeb6u1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 12,324 kB
  • ctags: 4,908
  • sloc: ansic: 26,659; sh: 13,155; lex: 2,286; perl: 1,156; yacc: 757; makefile: 605; 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 (39 lines) | stat: -rwxr-xr-x 874 bytes parent folder | download | duplicates (13)
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
37
38
39
#! /bin/sh
# -*- ksh -*-

# This program checks that a2ps handles correctly --file-align
# with non delegated files.

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

# Where is the test file
TEST_FILE=$TST_DIR/3-pages.txt

# Initialize the success
failure=0

for file_alignment in virtual rank page sheet 3
do
  # Checked and reference outputs
  REF_FILE=$REF_DIR/al1-${file_alignment}.ps
  CHK_FILE=$CHK_DIR/al1-${file_alignment}.ps

  # The options to run a2ps with
  OPT="-Eplain -4 --file-align=${file_alignment} -Pawkout -s2"

  # Generation of the reports
  # It must not crash
  $verbose "testing: --file-align=${file_alignment}"
  $CHK $OPT $TEST_FILE $TEST_FILE > $CHK_FILE 2>&5

  # build the ref if not here
  if test -f $REF_FILE; then :; else
    $REF $OPT $TEST_FILE $TEST_FILE > $REF_FILE 2>&5
  fi

  # Compare
  cmp -s $REF_FILE $CHK_FILE 2> /dev/null
done

exit 0