mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
maint: avoid new grep -q syntax-check failures
* cfg.mk: Exclude NEWS from the check. * init.cfg: s/grep -q/grep >/dev/null/. * tests/ls/hyperlink.sh: Likewise. * tests/ls/symlink-quote.sh: Likewise.
This commit is contained in:
1 parent
e902f9b88d
commit
e3bb975448
4 files changed
+10
-6
No files matched your search
@@ -599,8 +599,8 @@ sc_env_test_dependencies:
|
||||
grep -vF '[' |paste -d'|' -s))" tests | \
|
||||
sed "s/\([^:]\):.*env \([^)' ]*\).*/\1 \2/" | uniq | \
|
||||
while read test prog; do \
|
||||
printf '%s' $$test | grep -q '\.pl$$' && continue; \
|
||||
grep -q "print_ver_.* $$prog" $$test \
|
||||
printf '%s' $$test | grep '\.pl$$' >/dev/null && continue; \
|
||||
grep "print_ver_.* $$prog" $$test >/dev/null \
|
||||
|| echo $$test should call: print_ver_ $$prog; \
|
||||
done | grep . && exit 1 || :
|
||||
|
||||
@@ -657,7 +657,7 @@ sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
|
||||
while read file name; do \
|
||||
for i in $$name; do \
|
||||
case "$$i" in install) i=ginstall;; esac; \
|
||||
grep -w "$$i" $$file|grep -vw print_ver_|grep -q . \
|
||||
grep -w "$$i" $$file|grep -vw print_ver_|grep . >/dev/null \
|
||||
|| { fail=1; \
|
||||
echo "*** Test: $$file, offending: $$i." 1>&2; };\
|
||||
done; \
|
||||
@@ -906,6 +906,10 @@ exclude_file_name_regexp--sc_ensure_dblspace_after_dot_before_id_est = \.diff$$
|
||||
exclude_file_name_regexp--sc_ensure_comma_after_id_est = \.diff|$(_ll)$$
|
||||
exclude_file_name_regexp--sc_long_lines = \.diff$$|$(_ll)
|
||||
|
||||
# `grep . -q` is not exactly equivalent to `grep . >/dev/null`
|
||||
# and this difference is significant in the NEWS description
|
||||
exclude_file_name_regexp--sc_unportable_grep_q = NEWS
|
||||
|
||||
# Augment AM_CFLAGS to include our per-directory options:
|
||||
AM_CFLAGS += $($(@D)_CFLAGS)
|
||||
|
||||
|
||||
@@ -636,7 +636,7 @@ mkfifo_or_skip_()
|
||||
|
||||
trap_sigpipe_or_skip_()
|
||||
{
|
||||
(trap '' PIPE && yes | :) 2>&1 | grep -qF 'Broken pipe' ||
|
||||
(trap '' PIPE && yes | :) 2>&1 | grep -F 'Broken pipe' >/dev/null ||
|
||||
skip_ 'trapping SIGPIPE is not supported'
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ encode() {
|
||||
|
||||
ls_encoded() {
|
||||
ef=$(encode "$1")
|
||||
echo "$ef" | grep -q 'dir$' && dir=: || dir=''
|
||||
echo "$ef" | grep 'dir$' >/dev/null && dir=: || dir=''
|
||||
printf '\033]8;;file:///%s\a%s\033]8;;\a%s\n' \
|
||||
"$ef" "$1" "$dir"
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ ln -s 'needs quoting' symlink || framework_failure_
|
||||
ls -l --quoting-style='shell-escape' symlink >out || fail=1
|
||||
|
||||
# Coreutils v8.26 and 8.27 failed to quote the target name
|
||||
grep -q "symlink -> 'needs quoting'\$" out ||
|
||||
grep "symlink -> 'needs quoting'\$" out >/dev/null ||
|
||||
{ cat out; fail=1; }
|
||||
|
||||
Exit $fail
|
||||
Reference in new issue
Block a user