summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tests/bibtex-openout-test.pl
blob: cc00564e5d395fc154c1385e4c1426d2682f9671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env perl
# $Id$
# Public domain.  Originally written 2010, Karl Berry.
# Check that bibtex respects openout_any.

# srcdir = web2c (in the source tree)
BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `cd \`dirname $0\`/.. && pwd`); }
require "$srcdir/../tests/common-test.pl";

exit (&main ());

sub main
{
  $ENV{"openout_any"} = "p";  # should already be in texmf.cnf, but ...
  
  # .blg open of abs path should fail:
  my $ret = &test_run ("./bibtex", "$srcdir/exampl.aux");

  # The test fails if the program succeeded.  Could also check the output.
  my $bad = ($ret == 0);
  return $bad;
}