File: guess-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 (41 lines) | stat: -rwxr-xr-x 1,075 bytes parent folder | download | duplicates (12)
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
40
41
#! /bin/sh
# -*- ksh -*-

# This program tries most common options of the program

# This is were you installed the tested version of the program
# (and the directories test, test-ps and diff)

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

pairs="includeres:perl
psmandup:sh
run-help:zsh
strange.mail:mail
ehandler:ps"

for pair in $pairs
do
  # What are the filename and its type
  file=`echo $pair | sed "s/:.*//"g`
  lang=`echo $pair | sed "s/[^:]*://"g`
  
  # Check that a2ps agrees
  res=`$CHK --guess $TST_DIR/$file | sed -e 's/[^(]*(//g' | sed -e 's/)[^)]*//g'`
  if test "$res" != $lang; then
    has_failed=yes;
    cant_recognize="$cant_recognize $lang"
  fi
done

# Understandable report of the problems
if test x$has_failed = xyes; then
  echo "Your /etc/magic file seems a bit junky."
  echo "It is unable to recognize the type of$cant_recognize files"
  echo "You might run into bad guesses with automatic pretty-printing"
  echo "-- Please note that this is not an error from a2ps."
  echo "-- Don't be worried by this failure, nor should you report it"
fi

exit 0