From 9c69eb77863e25a10cce2e85589f5fd702a5e9d5 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 3 Oct 2005 01:05:28 +0000 Subject: [PATCH] validation: remove refresh-redirects from retrieved pages validation: 'check_all' is now the default action --- scripts/validate.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/validate.sh b/scripts/validate.sh index 6e906c9..3c5b9f2 100755 --- a/scripts/validate.sh +++ b/scripts/validate.sh @@ -21,6 +21,8 @@ function do_single() local TESTNAME=$(basename $1) # replace IPs and ports in the curl-file by local settings cat "$1/input.curl" | substitute_constants | curl --insecure --silent --output "${2}/${TESTNAME}.html" --config - + # remove possible refresh-redirect + sed -i 's/]*>//g' "${2}/${TESTNAME}.html" # there is no status in certain cases - e.g. for error 404 if [ -e "${2}/${TESTNAME}.html" ] then sed "1,/CBOX-STATUS-begin/d; /CBOX-STATUS-end/,\$d" "${2}/${TESTNAME}.html" >"${2}/${TESTNAME}.status" @@ -103,7 +105,8 @@ function substitute_constants() ##################### main ########################### -ACTION="--help" +# do all checks, if nothing is specified +ACTION="check_all" [ $# -gt 0 ] && ACTION=$1 case "$ACTION" in @@ -120,6 +123,7 @@ case "$ACTION" in import_style ;; check_all ) + # default action "$0" list | sort | while read a do echo -n "Validating $a ..." "$0" check "$a" @@ -128,9 +132,9 @@ case "$ACTION" in ;; * ) echo "Syntax of $(basename $0)" - echo -e "\t list \t\t - show a list of available test cases" + echo -e "\t check_all \t - execute all test cases [default]" echo -e "\t check NAME \t - execute a test case" - echo -e "\t check_all \t - execute all test cases" + echo -e "\t list \t\t - show a list of available test cases" echo -e "\t help \t\t - this syntax information" echo ;;