1#!/usr/bin/env perl
2# $Id: pbibtex-openout-test.pl 17384 2010-03-08 18:49:47Z karl $
3# Public domain.  Originally written 2010, Karl Berry.
4# Check that pbibtex respects openout_any.
5
6# srcdir = web2c (in the source tree)
7BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `cd \`dirname $0\`/.. && pwd`); }
8require "$srcdir/../tests/common-test.pl";
9
10exit (&main ());
11
12sub 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 ("./pbibtex", "$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}
23