File: options-1.tst

package info (click to toggle)
a2ps 1:4.14-1.1+deb6u1
  • 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 (25 lines) | stat: -rwxr-xr-x 669 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
#! /bin/sh
# -*- ksh -*-

# Test if the basic options work, and produce on stdout only.

. ./defs || exit 1

tmp=$tmpdir/opt-1

for p in --version --help --list=features --list=printers --list=options \
         --list=media --list=style-sheets --list=delegations \
	 --list=macro-meta-sequences --list=encodings --list=user-options \
         --list=prologues --list=ppd;
do
  # There should be nothing on stderr */
  $verbose "Running a2ps $p"
  # I used to run this test:
  #err=`$CHK $p 2>&1 >/dev/null`
  #test "x$err" = x
  # but it seems that many shells are not able to redirect fd 2 like this.
  $CHK $p >/dev/null 2>$tmp
  test "x`cat $tmp`" = x
done

exit 0