# HG changeset patch # User ivo # Date 1185893444 0 # Node ID 26db9462007310967a1950aee9af96c6b9d23e36 # Parent 66a261a0e0f26072b2e3249da136fffc51d4173d Shorten (un)setting of all test flags Now that we have a list of all flags, we can set them to yes or no with a for-loop. diff -r 66a261a0e0f2 -r 26db94620073 TOOLS/checktree.sh --- a/TOOLS/checktree.sh Tue Jul 31 14:48:13 2007 +0000 +++ b/TOOLS/checktree.sh Tue Jul 31 14:50:44 2007 +0000 @@ -63,32 +63,10 @@ # Helper functions -enable_all_tests() { - _spaces=yes - _extensions=yes - _crlf=yes - _tabs=yes - _trailws=yes - _rcsid=yes - _oll=yes - _charset=yes - _stupid=yes - _gnu=yes - _res=yes -} - -disable_all_tests() { - _spaces=no - _extensions=no - _crlf=no - _tabs=no - _trailws=no - _rcsid=no - _oll=no - _charset=no - _stupid=no - _gnu=no - _res=no +set_all_tests() { + for i in $testflags ; do + eval _$i=$1 + done } printoption() { @@ -148,13 +126,13 @@ exit ;; -all) - enable_all_tests + set_all_tests yes ;; -noall) - disable_all_tests + set_all_tests no ;; -none) - disable_all_tests + set_all_tests no ;; -*) var=`echo X$i | sed 's/^X-//'`