/
niceSOFT
/
grep
Обзор
Документация
Войти
/
niceSOFT
/
grep
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/backref-anchor
27 строк
698 B
Jim Meyering
grep: gnulib regex fixes address long-standing backref bugs
19 апр 2026, 01:57
19 апр 2026, 01:57
b2a5247
Код
Авторство
О чём код?
#! /bin/sh # Test for two backref+anchor-related bugs. # # Copyright 2026 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. . "${srcdir=.}/init.sh"; path_prepend_ ../src echo ab > in || framework_failure_ echo a > exp || framework_failure_ fail=0 # Match "a" grep -Eo '^(.?)(.?).?\2\1' in > out 2> err || fail=1 compare exp out || fail=1 compare /dev/null err || fail=1 # Expect no match. returns_ 1 grep -Eo '^(.?)(.?).?\2\1$' in > out 2> err || fail=1 compare /dev/null out || fail=1 compare /dev/null err || fail=1 Exit $fail