1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
# t310 --- rlog on valid RCS file
#
# Copyright (C) 2010-2022 Thien-Thi Nguyen
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/common
split_std_out_err no
##
# Check that rlog exits successfully
# when called on the bundled RCS files.
##
rout=$wd/rlog.out
norm ()
{
# $1 -- title, in the form of ADJECTIVE-PHRASE
# $2 -- RCS file
must "cp -f $2 $v"
rlog $v > $rout || problem "rlog barfed on valid ($1) RCS file"
silence_means_death $rout "rlog $v (copied from $2)"
}
norm 'minimally-empty' `bundled_commav empty-minimal`
norm 'empty' `bundled_commav empty`
norm 'single-entry' `bundled_commav one`
norm 'two-entry' `bundled_commav two`
norm '2-entry with branches' `bundled_commav two`
must "sed '25s/ANOTHER/@/;26d' $v > $v-T"
norm '2-entry w/ empty log' $v-T
elm='empty log message'
grep -F "$elm" $rout \
|| problem "missing \"$elm\" output"
##
# Check rlog on a CVS-created ,v (with ‘commitid’ keywords).
##
norm 'CVS-created (w/ commitid) keyword' `bundled_commav rcsinfo`
##
# Also check that header key ‘integrity’
# does not cause problems for those files.
##
cat > $wd/insert <<EOF
integrity
@@
;
EOF
v_wint=$wd/with-integrity
wint ()
{
# $1 -- title, in the form of ADJECTIVE-PHRASE
# $2 -- RCS file
sed -e "/^locks/r $wd/insert" "$2" > $v_wint
silence_means_death $v_wint \
"sed-effected addition of integrity to $1 RCS file"
norm "$1, with integrity" $v_wint
}
wint 'minimally-empty' `bundled_commav empty-minimal`
wint 'empty' `bundled_commav empty`
wint 'single-entry' `bundled_commav one`
wint 'two-entry' `bundled_commav two`
wint '2-entry with branches' `bundled_commav two`
exit 0
# t310 ends here
|