File: run-opts

package info (click to toggle)
bashdb 3.1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,252 kB
  • ctags: 117
  • sloc: sh: 4,880; pascal: 3,186; lisp: 484; makefile: 315; ansic: 294
file content (36 lines) | stat: -rwxr-xr-x 844 bytes parent folder | download | duplicates (2)
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
#$Id: run-opts,v 1.1 2006/01/30 01:50:56 rockyb Exp $
# Test bash options.

if test -z "$srcdir"  ; then
  srcdir=`pwd`
fi

if test -z "$builddir"  ; then
  builddir=`pwd`
fi

. ${builddir}/check_common

TEST_NAME='sopts'
TEST_FILE="$builddir/${TEST_NAME}.check"
(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)

check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right

TEMP=`getopt1 -o testing 2>&1 >/dev/null`
if [ 0 = $? ] ; then
  TEST_NAME='lopts'
  TEST_FILE="$builddir/${TEST_NAME}.check"
  (cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
  
  check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
fi

# Return code tells testing mechanism whether passed or not.
exit $?

#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***