blob: 441328257d6384bdecb265ed7e6f78a3a01a8271 (
plain)
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
|
#!/usr/bin/env perl
# $Id$
# Public domain. Originally written 2011, Karl Berry.
# Check that makeindex doesn't create spurious output from nested ranges.
# See nested-range.tex and -bb.tex.
# srcdir = makeindexk (in the source tree)
BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `cd \`dirname $0\`/.. && pwd`); }
require "$srcdir/../tests/common-test.pl";
exit (&main ());
sub main {
my $ret = &test_run ("./makeindex", "$srcdir/tests/nested-range.idx",
"-o", "nested-range.ind",
"-t", "nested-range.ilg");
# The test fails if the output contains \(.
my $bad = 0;
local *IND;
$IND = "nested-range.ind";
open (IND) || die "open($IND) failed: $!";
while (<IND>) {
$bad = 1 if /\\\(/;
}
close (IND) || die "close($IND) failed: $!";
return $bad;
}
|