/
niceSOFT
/
patch
Обзор
Документация
Войти
/
niceSOFT
/
patch
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/preserve-c-function-names
72 строки
1 KB
Paul Eggert
maint: make update-copyright
21 апр 2026, 20:10
21 апр 2026, 20:10
494ee0b
Код
Авторство
О чём код?
# Copyright 2009-2026 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # in any medium, are permitted without royalty provided the copyright # notice and this notice are preserved. # Preserve the "diff -p" output in reject files . $srcdir/test-lib.sh require cat use_local_patch use_tmpdir cat > a <<EOF int foo() { /* waste a line */ return 1; } EOF cat > b <<EOF int foo() { /* waste a line */ return 2; } EOF preserve_trailing_blank= cat > ab.diff <<EOF *** a --- b *************** int foo() *** 2,6 **** { /* waste a line */ $preserve_trailing_blank ! return 1; } --- 2,6 ---- { /* waste a line */ $preserve_trailing_blank ! return 2; } EOF touch c check 'patch c < ab.diff || cat c.rej' <<EOF patching file c Hunk #1 FAILED at 2. 1 out of 1 hunk FAILED -- saving rejects to file c.rej *** a --- b *************** int foo() *** 2,6 **** { /* waste a line */ $preserve_trailing_blank ! return 1; } --- 2,6 ---- { /* waste a line */ $preserve_trailing_blank ! return 2; } EOF