File: test-parseargs.sh

package info (click to toggle)
haskell-parseargs 0.2.0.9-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 128 kB
  • sloc: haskell: 569; sh: 18; makefile: 2
file content (21 lines) | stat: -rwxr-xr-x 411 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Copyright © 2016 Bart Massey
# Run simple parseargs tests
PA=parseargs-example
TMP=/tmp/test-parseargs-$$
trap "rm -f $TMP" 0 1 2 3 15
for f in tests/*.in
do
    T="`basename $f .in`"
    $PA `cat $f` >$TMP
    if ! cmp $TMP tests/$T.out
    then
        echo "test $T failed"
        echo "expected:"
        cat tests/$T.out
        echo "got:"
        cat $TMP
        exit 1
    fi
done
exit 0