"Fossies" - the Fresh Open Source Software Archive

Member "bashdb-5.0-1.1.0/test/integration/test-interrupt" (5 Sep 2019, 848 Bytes) of package /linux/privat/bashdb-5.0-1.1.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "test-interrupt": 4.4-1.0.1_vs_5.0-1.1.0.

    1 #!/usr/local/bin/bash
    2 t=${0##*/}; TEST_NAME=${t:5}   # basename $0 with 'test-' stripped off
    3 
    4 [ -z "$builddir" ] && export builddir=$PWD
    5 
    6 . ${builddir}/check-common.sh
    7 
    8 if [[ $srcdir != $builddir ]] ; then
    9     echo "Skipping when building outside the source tree"
   10     exit 77
   11 fi
   12 case $host_os in
   13     cygwin | darwin* | solaris* )
   14     exit 77;;
   15     * )
   16     : ;;
   17 esac
   18 
   19 TEST_FILE="$builddir/${TEST_NAME}.check"
   20 
   21 if (( 3 == ${BASH_VERSINFO[0]} )) ; then
   22     test_script=${TEST_NAME}-3.tests
   23 elif (( 4 == ${BASH_VERSINFO[0]} )) ; then
   24     test_script=${TEST_NAME}.tests
   25 fi
   26 
   27 (cd $srcdir && $SH ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
   28 sleep 1
   29 check_output $TEST_FILE ${top_builddir}/test/data/${TEST_NAME}.right
   30 rc=$?
   31 
   32 ((0 != rc)) && exit $rc
   33 rm -f $top_builddir/test/interrupt.tst
   34 
   35 # Return code tells testing mechanism whether passed or not.
   36 exit 0