# HG changeset patch # User ivo # Date 1185818906 0 # Node ID 91ccac9cc015db97db9bc443edb8094241ee10b6 # Parent ec8ca7b30d0f87a8b1c50d681ace0580115ae857 Add test for GNUisms It currently tests for case ... ranges only, but other tests (like GNU extensions to libc) can be added later diff -r ec8ca7b30d0f -r 91ccac9cc015 TOOLS/checktree.sh --- a/TOOLS/checktree.sh Mon Jul 30 18:00:11 2007 +0000 +++ b/TOOLS/checktree.sh Mon Jul 30 18:08:26 2007 +0000 @@ -26,6 +26,7 @@ _charset=no _stupid=no _showcont=no +_gnu=no _color=yes _head=yes @@ -52,6 +53,7 @@ _oll=yes _charset=yes _stupid=yes + _gnu=yes } disable_all_tests() { @@ -64,6 +66,7 @@ _oll=no _charset=no _stupid=no + _gnu=no } printoption() { @@ -105,6 +108,7 @@ printoption "oll " "test for overly long lines" "$_oll" printoption "charset " "test for wrong charset" "$_charset" printoption "stupid " "test for stupid code" "$_stupid" + printoption "gnu " "test for GNUisms" "$_gnu" echo printoption "all " "enable all tests" "no" echo " (-noall can be specified as -none)" @@ -207,6 +211,12 @@ -noshowcont) _showcont=no ;; + -gnu) + _gnu=yes + ;; + -nognu) + _gnu=no + ;; -*) echo "unknown option: $i" >&2 exit 0 @@ -298,6 +308,13 @@ # ----------------------------------------------------------------------------- +if [ "$_gnu" = "yes" ]; then + printhead "checking for GNUisms ..." + grep $_grepopts "case.*\.\.\..*:" $filelist +fi + +# ----------------------------------------------------------------------------- + if [ "$_charset" = "yes" ]; then printhead "checking bad charsets ..." for I in $filelist ; do