Debian Codegraph @

tests/t806

raw
1 # t806 --- invalid RCS file: missing string for desc, log, text
2 #
3 # Copyright (C) 2016-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
20 $hey echo ' -*- org -*-'
21
22 ##
23 # Check that missing string value for ‘desc’, ‘log’ and ‘text’
24 # cause rlog to abort w/ missing KEYWORD message.
25 ##
26
27 try ()
28 {
29 # $1 -- sed(1) address range to delete
30 # $2 -- RCS file keyword
31 addr=$1
32 kw=$2
33 context="for missing $kw string"
34 err=$wd/err.$kw
35
36 $hey echo "* $kw"
37 sed ${addr}d `bundled_commav two` > $v
38 rlog $v 2>$err \
39 && problem "rlog did not fail $context"
40 grep -n -H "missing string after.*$kw" $err >/dev/null \
41 || problem "wrong diagnostic $context"
42 }
43
44 try 19,20 desc
45 try 25,26 log
46 try 28,30 text
47
48 exit 0
49
50 # t806 ends here