From: <sp...@us...> - 2004-02-23 18:25:16
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10939/test/core Added Files: run_test debug0.out Log Message: Added script to test the test suite --- NEW FILE: run_test --- #!/bin/sh ############################################################################## # run-test # $Id: run_test,v 1.1 2004/02/23 18:11:40 space2 Exp $ # Executes a series of test # You can specify the test name to execute one test or all to execute # all tests (it will search for test_core_*) # # Todo: this should work for unicode too # Check arguments if [ "x$1" = "x" ]; then echo "Usage: run_test <test_base_name|all>"; echo "Example: run_test debug0"; exit fi # Check which test suite to run PWD=`pwd` TESTSUITE=`basename "$PWD"` # Check if all test need to be executed if [ "$1" = "all" ]; then for i in test_${TESTSUITE}_*; do BASENAME=${i##test_${TESTSUITE}_} $0 $BASENAME done exit fi # String any extensions if present NAME=${1%%.*} # Some variables TESTTMP=`mktemp /tmp/rtk-test-XXXXXX` TESTOUT=${NAME}.out trap "rm -f $TESTTMP" 0 1 2 3 9 11 13 15 # Execute the test echo -n "Testing $NAME ... "; ./test_${TESTSUITE}_${NAME} > $TESTTMP if cmp --quiet $TESTOUT $TESTTMP; then echo "Passed"; else echo "!!!FAILED!!!"; echo "diff -aur:"; diff -aur $TESTOUT $TESTTMP fi --- NEW FILE: debug0.out --- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Example code for the DEBUGing functionality of Rtk -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- DEBUG: A very important message ! MSGBOX: A very important message ! DEBUG: An important message! MSGBOX: An important message! DEBUG: You should know about this! |