mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 05:31:34 +00:00
Add test for GNUisms
It currently tests for case ... ranges only, but other tests (like GNU extensions to libc) can be added later git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23947 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8ff547240b
commit
4b2e3c4a82
@ -26,6 +26,7 @@ _oll=no
|
|||||||
_charset=no
|
_charset=no
|
||||||
_stupid=no
|
_stupid=no
|
||||||
_showcont=no
|
_showcont=no
|
||||||
|
_gnu=no
|
||||||
|
|
||||||
_color=yes
|
_color=yes
|
||||||
_head=yes
|
_head=yes
|
||||||
@ -52,6 +53,7 @@ enable_all_tests() {
|
|||||||
_oll=yes
|
_oll=yes
|
||||||
_charset=yes
|
_charset=yes
|
||||||
_stupid=yes
|
_stupid=yes
|
||||||
|
_gnu=yes
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_all_tests() {
|
disable_all_tests() {
|
||||||
@ -64,6 +66,7 @@ disable_all_tests() {
|
|||||||
_oll=no
|
_oll=no
|
||||||
_charset=no
|
_charset=no
|
||||||
_stupid=no
|
_stupid=no
|
||||||
|
_gnu=no
|
||||||
}
|
}
|
||||||
|
|
||||||
printoption() {
|
printoption() {
|
||||||
@ -105,6 +108,7 @@ for i in "$@"; do
|
|||||||
printoption "oll " "test for overly long lines" "$_oll"
|
printoption "oll " "test for overly long lines" "$_oll"
|
||||||
printoption "charset " "test for wrong charset" "$_charset"
|
printoption "charset " "test for wrong charset" "$_charset"
|
||||||
printoption "stupid " "test for stupid code" "$_stupid"
|
printoption "stupid " "test for stupid code" "$_stupid"
|
||||||
|
printoption "gnu " "test for GNUisms" "$_gnu"
|
||||||
echo
|
echo
|
||||||
printoption "all " "enable all tests" "no"
|
printoption "all " "enable all tests" "no"
|
||||||
echo " (-noall can be specified as -none)"
|
echo " (-noall can be specified as -none)"
|
||||||
@ -207,6 +211,12 @@ for i in "$@"; do
|
|||||||
-noshowcont)
|
-noshowcont)
|
||||||
_showcont=no
|
_showcont=no
|
||||||
;;
|
;;
|
||||||
|
-gnu)
|
||||||
|
_gnu=yes
|
||||||
|
;;
|
||||||
|
-nognu)
|
||||||
|
_gnu=no
|
||||||
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "unknown option: $i" >&2
|
echo "unknown option: $i" >&2
|
||||||
exit 0
|
exit 0
|
||||||
@ -298,6 +308,13 @@ fi
|
|||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ "$_gnu" = "yes" ]; then
|
||||||
|
printhead "checking for GNUisms ..."
|
||||||
|
grep $_grepopts "case.*\.\.\..*:" $filelist
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ "$_charset" = "yes" ]; then
|
if [ "$_charset" = "yes" ]; then
|
||||||
printhead "checking bad charsets ..."
|
printhead "checking bad charsets ..."
|
||||||
for I in $filelist ; do
|
for I in $filelist ; do
|
||||||
|
Loading…
Reference in New Issue
Block a user