Ignore:
Timestamp:
Apr 13, 2011, 4:17:42 PM (11 years ago)
Author:
Peter
Message:

improve error message when calling yat-config incorrectly. Use function 'run' implemented in common_defsrather than local version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/yat_config_test.sh

    r2421 r2473  
    2828. ./common_defs.sh || exit 1
    2929
    30 
    31 run ()
    32 {
    33 exitcode=0
    34 sh $prog ${1+"$@"} > stdout 2>stderr || exitcode=$?
    35 cat stderr >&2
    36 cat stdout
    37 test $exitcode = 0 || exit 1
    38 }
    39 
    4030prog=${abs_top_builddir}/build_support/for_installation/yat-config
    4131
    4232for opt in --version --help; do
    43 run ${opt}
     33run sh 0 $prog ${opt}
    4434test -s stderr && exit 1
    4535test -s stdout || exit 1
     
    4838grep '^installed=yes' ${prog} || exit 1
    4939
     40run sh 1 $prog --nonsense
     41grep 'yat-config:.*--nonsense' stderr || exit 1
     42grep 'for more information' stderr || exit 1
     43
    5044exit 0
Note: See TracChangeset for help on using the changeset viewer.