Debian Codegraph @

texk/web2c/uptexdir/upbibtex-openout-test.pl

raw
1 #!/usr/bin/env perl
2 #
3 # Public domain. Originally written 2010, Karl Berry.
4 # Check that upbibtex respects openout_any.
5
6 # srcdir = web2c (in the source tree)
7 BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `cd \`dirname $0\`/.. && pwd`); }
8 require "$srcdir/../tests/common-test.pl";
9
10 exit (&main ());
11
12 sub main
13 {
14 $ENV{"openout_any"} = "p"; # should already be in texmf.cnf, but ...
15
16 # .blg open of abs path should fail:
17 my $ret = &test_run ("./upbibtex", "$srcdir/tests/exampl.aux");
18
19 # The test fails if the program succeeded. Could also check the output.
20 my $bad = ($ret == 0);
21 return $bad;
22 }