| 1 |
# common-kn (kw normalization) variables / subroutines |
| 2 |
|
| 3 |
# Copyright (C) 2010-2022 Thien-Thi Nguyen |
| 4 |
# |
| 5 |
# This file is part of GNU RCS. |
| 6 |
# |
| 7 |
# GNU RCS is free software: you can redistribute it and/or modify it |
| 8 |
# under the terms of the GNU General Public License as published by |
| 9 |
# the Free Software Foundation, either version 3 of the License, or |
| 10 |
# (at your option) any later version. |
| 11 |
# |
| 12 |
# GNU RCS is distributed in the hope that it will be useful, |
| 13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty |
| 14 |
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 |
# See the GNU General Public License for more details. |
| 16 |
# |
| 17 |
# You should have received a copy of the GNU General Public License |
| 18 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
# (shell-script-mode) |
| 21 |
|
| 22 |
# variables |
| 23 |
|
| 24 |
expected=$wd/expected |
| 25 |
actual=$wd/actual |
| 26 |
normal=$wd/normal |
| 27 |
doubt=$wd/diff.out |
| 28 |
|
| 29 |
# functions |
| 30 |
|
| 31 |
prep_b_comparison () |
| 32 |
{ |
| 33 |
must 'cp `bundled_commav b` $v' |
| 34 |
wdabs="`cd $wd ; pwd`" |
| 35 |
cat > $wd/x-normal <<EOF |
| 36 |
s|${wdabs}|/home/ttn/build/GNU/rcs/tests/fake|g |
| 37 |
s|x,v|b,v|g |
| 38 |
EOF |
| 39 |
} |
| 40 |
|
| 41 |
normalize_b_and_diff () |
| 42 |
{ |
| 43 |
# $1 -- title |
| 44 |
title="$1" |
| 45 |
must "sed -f $wd/x-normal $actual > $normal" |
| 46 |
diff -u $expected $normal 1> $doubt 2>&1 |
| 47 |
if test -s $expected ; then |
| 48 |
silence_means_death $actual "$title" |
| 49 |
else |
| 50 |
noiselessness_rules $actual "$title" |
| 51 |
fi |
| 52 |
noiselessness_rules $doubt "$title" |
| 53 |
} |
| 54 |
|
| 55 |
# common-kn ends here |