Debian Codegraph @

tests/t311

raw
1 # t311 --- rlog (parsing in general) accepts numeric state, author
2 #
3 # Copyright (C) 2010-2022 Thien-Thi Nguyen
4 #
5 # This program is free software: you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation, either version 3 of
8 # the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty
12 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 # See the GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 . $srcdir/common
19 split_std_out_err no
20
21 ##
22 # Check that rlog exits successfully for an RCS file where
23 # identifiers for state or author are numeric (i.e., "[0-9]+").
24 #
25 # This is a feature introduced in RCS 5.8.
26 ##
27
28 rout=$wd/rlog.out
29
30 try ()
31 {
32 # $1 -- field name
33 # $2 -- sed fragment
34 munged="with numeric $1"
35 sedscript=$2
36
37 must 'sed -e "$sedscript" `bundled_commav one` > $v'
38 rlog $v > $rout || problem "rlog barfed on RCS file $munged"
39 silence_means_death $rout "rlog $v ($munged)"
40 }
41
42 try 'state' 's/state Exp/state 42/'
43 try 'author' 's/author ttn/author 42/'
44
45 exit 0
46
47 # t311 ends here