#!/bin/bash # $HeadURL$ $LastChangedRevision$ PROGNAME=${0##*/} SANDPIT=$(pwd) . $(ade-config ade_share_prefix)/include/adetestsupport.sh ############################################################################## # # LOAD TEST-SPECIFIC CONFIGURATION FILE # ############################################################################## [ "X$ADETEST_MODROOT" != X ] || adetestsupport_error "'ADETEST_MODROOT' not defined" [ -r "$ADETEST_MODROOT/tests/in/$PROGNAME" ] || adetestsupport_error "can't read $ADETEST_MODROOT/tests/in/$PROGNAME" . "$ADETEST_MODROOT/tests/in/$PROGNAME" || adetestsupport_error "problem sourcing $ADETEST_MODROOT/tests/in/$PROGNAME" [ "X$PROGRAMS" != X ] || adetestsupport_error "'PROGRAMS' not defined" ############################################################################## # # START OF TESTS # ############################################################################## echo "checking exit codes with '-V' ..." for PROGRAM in $PROGRAMS; do adetestsupport_debug 4 "running '$PROGRAM -V' and checking return code ..." $PROGRAM -V > /dev/null done echo "checking exit codes with '--version' ..." for PROGRAM in $PROGRAMS; do adetestsupport_debug 4 "running '$PROGRAM --version' and checking return code ..." $PROGRAM --version > /dev/null done echo "checking reply format with '-V' ..." for PROGRAM in $PROGRAMS; do adetestsupport_debug 4 "running '$PROGRAM -V' and checking reply format ..." $PROGRAM -V | sed \ -e "/^$PROGRAM version [^ ][^ ]*\$/d" \ -e "/^$PROGRAM version development\\.revision\\.[0-9][0-9]*\$/d" \ -e "/^$PROGRAM version development\\.branch\\.[0-9][0-9]*\\.[0-9][0-9]*\$/d" done echo "checking reply format with '--version' ..." for PROGRAM in $PROGRAMS; do adetestsupport_debug 4 "running '$PROGRAM --version' and checking reply format ..." $PROGRAM --version | sed \ -e "/^$PROGRAM version [^ ][^ ]*\$/d" \ -e "/^$PROGRAM version development\\.revision\\.[0-9][0-9]*\$/d" \ -e "/^$PROGRAM version development\\.branch\\.[0-9][0-9]*\\.[0-9][0-9]*\$/d" done