diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-10-15 13:45:45 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-10-15 13:45:45 +0200 |
commit | b73cc7dccaa01778de20ade004e0c3bde2e2e36a (patch) | |
tree | a082fedea2f4a7e99b5cc6352c35e9b192b145ec /_test/webtest-stripper.sh | |
parent | 5e35ae2a19fba9e79a1b71d951d7f322b864c001 (diff) | |
download | rpg-b73cc7dccaa01778de20ade004e0c3bde2e2e36a.tar.gz rpg-b73cc7dccaa01778de20ade004e0c3bde2e2e36a.tar.bz2 |
renamed test directory
darcs-hash:20051015114545-7ad00-561552ce7e519d81146b5cb2d28203aee7c6d2ad.gz
Diffstat (limited to '_test/webtest-stripper.sh')
-rwxr-xr-x | _test/webtest-stripper.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/_test/webtest-stripper.sh b/_test/webtest-stripper.sh new file mode 100755 index 000000000..f7991cc0b --- /dev/null +++ b/_test/webtest-stripper.sh @@ -0,0 +1,41 @@ +#!/bin/sh +################################################################################ +# Quick script to make simpletest web test fail output more legible +# +# Run the web test group from the command line w/ the command: +# +# $ ./runtests.php -g [GROUP] 2> tmp +# +# redirecting the error messages to the file tmp +# +# Then run this command on the tmp file +# +# $ ./webtest-stripper.sh tmp +# +################################################################################ + +usage="Usage: ${0} [WEB_TEST_OUTPUT_FILE]"; + +if [ -z "$1" ]; then + echo $usage; + exit 1; +elif [ ! -f "$1" ]; then + echo "${1} is not a file!"; + echo $usage; + exit 1; +fi + +sed -e 's/\\n/\ +/g' "${1}" |\ +sed -e 's/\\//g' |\ +sed -e 's/FAIL.*Pattern \[\#\^/EXPECTED:\ +/g' |\ +sed -e 's/\$#i\].*string \[/\ +\ +GOT:\ +/g' |\ +sed -e 's/\]$/\ +----------------------------------------------------------------\ +/g' + +exit 0
\ No newline at end of file |