diff options
author | Jim Meyering <meyering@redhat.com> | 2011-09-10 15:14:21 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-09-15 14:25:22 +0200 |
commit | adb4b2ca3aef27eb8991f8cb022a85964f4ad49e (patch) | |
tree | a9769c79969274cd1e5fc4a45a195a2d644567d5 | |
parent | 46e5cc6fb27886af532e6f34c4491bd533637f7c (diff) | |
download | grep-adb4b2ca3aef27eb8991f8cb022a85964f4ad49e.tar.gz |
tests: stop using skip_test_; use skip_ instead
* tests/init.cfg (skip_test_): Remove definition. Use the improved
skip_ function from init.sh, now that it has the same feature.
* tests/euc-mb: s/skip_test_/skip_/
* tests/sjis-mb: Likewise.
* tests/fmbtest: Likewise.
-rwxr-xr-x | tests/euc-mb | 2 | ||||
-rwxr-xr-x | tests/fmbtest | 2 | ||||
-rw-r--r-- | tests/init.cfg | 20 | ||||
-rwxr-xr-x | tests/sjis-mb | 2 |
4 files changed, 8 insertions, 18 deletions
diff --git a/tests/euc-mb b/tests/euc-mb index ee5ee611..c0af220a 100755 --- a/tests/euc-mb +++ b/tests/euc-mb @@ -22,7 +22,7 @@ euc_grep () { case $(get-mb-cur-max $locale) in 2|3) ;; - *) skip_test_ 'EUC-JP locale not found' ;; + *) skip_ 'EUC-JP locale not found' ;; esac fail=0 diff --git a/tests/fmbtest b/tests/fmbtest index 4e4ee893..38ab73bb 100755 --- a/tests/fmbtest +++ b/tests/fmbtest @@ -11,7 +11,7 @@ cz=cs_CZ.UTF-8 # If cs_CZ.UTF-8 locale doesn't work, skip this test. LC_ALL=$cz locale -k LC_CTYPE 2>/dev/null | grep -q charmap.*UTF-8 \ - || skip_test_ this system lacks the $cz locale + || skip_ this system lacks the $cz locale # If matching is done in single-byte mode, skip this test too printf 'é\n' | LC_ALL=$cz grep -Eq '^[é]{2}$' diff --git a/tests/init.cfg b/tests/init.cfg index 25e87f35..27b68df4 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -1,19 +1,9 @@ # This file is sourced by init.sh, *before* its initialization. -# This goes hand in hand with the "exec 9>&2;" in tests/Makefile.am's +# This goes hand in hand with the "9>&2;" in tests/Makefile.am's # TESTS_ENVIRONMENT definition. stderr_fileno_=9 -# Use this function rather than init.sh's skip_. -# The "skip_" function emits its diagnostic only to one stream. -# This one emits it both to the tty and to the log file. -skip_test_() -{ - echo "$0: skipping test: $@" | head -1 1>&9 - echo "$0: skipping test: $@" 1>&2 - Exit 77 -} - # Map settings of "none" to the empty string. test _"$LOCALE_FR" = _none && LOCALE_FR= test _"$LOCALE_FR_UTF8" = _none && LOCALE_FR_UTF8= @@ -50,12 +40,12 @@ test "$envvar_check_fail" = 1 && fail_ "failed to unset the above envvars" require_timeout_() { ( timeout 10s true ) > /dev/null 2>&1 \ - || skip_test_ your system lacks the timeout program + || skip_ your system lacks the timeout program } require_pcre_() { - echo . | grep -P . 2>err || skip_test_ no PCRE support + echo . | grep -P . 2>err || skip_ no PCRE support compare err /dev/null || fail_ PCRE available, but stderr not empty. } @@ -66,7 +56,7 @@ require_en_utf8_locale_() path_prepend_ . case $(get-mb-cur-max en_US.UTF-8) in [3456]) ;; - *) skip_test_ 'en_US.UTF-8 locale not found' ;; + *) skip_ 'en_US.UTF-8 locale not found' ;; esac } @@ -75,7 +65,7 @@ require_ru_RU_koi8_r() path_prepend_ . case $(get-mb-cur-max ru_RU.KOI8-R) in 1) ;; - *) skip_test_ 'ru_RU.KOI8-R locale not found' ;; + *) skip_ 'ru_RU.KOI8-R locale not found' ;; esac } diff --git a/tests/sjis-mb b/tests/sjis-mb index b5a18dcb..b1ec853d 100755 --- a/tests/sjis-mb +++ b/tests/sjis-mb @@ -40,7 +40,7 @@ test_grep() { test $? = 0 && compare out$k exp$k } -test "$(get-mb-cur-max $locale)" = 2 || skip_test_ 'SJIS locale not found' +test "$(get-mb-cur-max $locale)" = 2 || skip_ 'SJIS locale not found' failure_tests=@A successful_tests='%%AA @AA @A@@A' |