/
niceSOFT
/
grep
Обзор
Документация
Войти
/
niceSOFT
/
grep
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/context-0
27 строк
446 B
Paul Eggert
tests: add test case for -C 0 change
10 май 2014, 12:25
10 май 2014, 12:25
6f07900
Код
Авторство
О чём код?
#!/bin/sh # 0 lines of context . "${srcdir=.}/init.sh"; path_prepend_ ../src cat <<EOF > in || framework_failure_ needle 1st line of context 2nd line of context 3rd line of context another needle 5th line of context relative to first match 6th line... EOF cat <<EOF > exp || framework_failure_ needle -- another needle EOF fail=0 grep -C 0 needle in > out 2>err || fail=1 compare exp out || fail=1 compare /dev/null err || fail=1 Exit $fail