summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tests/bibtex-openout-test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/tests/bibtex-openout-test.pl')
-rwxr-xr-xBuild/source/texk/web2c/tests/bibtex-openout-test.pl25
1 files changed, 5 insertions, 20 deletions
diff --git a/Build/source/texk/web2c/tests/bibtex-openout-test.pl b/Build/source/texk/web2c/tests/bibtex-openout-test.pl
index 9d45effefa2..fc8dabfc846 100755
--- a/Build/source/texk/web2c/tests/bibtex-openout-test.pl
+++ b/Build/source/texk/web2c/tests/bibtex-openout-test.pl
@@ -1,35 +1,20 @@
#!/usr/bin/env perl
# $Id$
-# Copyright 2009 Karl Berry <tex-live@tug.org>.
+# Copyright 2009, 2010 Karl Berry <tex-live@tug.org>.
# You may freely use, modify and/or distribute this file.
# Check that bibtex respects openout_any.
-BEGIN {
- chomp ($mydir = `dirname $0`);
- unshift (@INC, "$mydir");
-}
+BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `pwd`); }
+require "$srcdir/tests/common-test.pl";
exit (&main ());
sub main
{
- # attempt at making it possible to run this when srcdir=builddir.
- $ENV{"srcdir"} = $mydir if ! exists $ENV{"srcdir"};
- my $srcdir = $ENV{"srcdir"};
-
- $ENV{"TEXMFCNF"} = "$srcdir/../kpathsea";
- $ENV{"BIBINPUTS"} = "$srcdir/tests";
- $ENV{"BSTINPUTS"} = "$srcdir/tests";
-
$ENV{"openout_any"} = "p"; # should already be in texmf.cnf, but ...
- my $prog = "./bibtex";
- die "$0: no program $prog in " . `pwd` if ! -x $prog;
-
- my @args = ("$srcdir/exampl.aux"); # blg open of abs path should fail
-
- $ret = system ($prog, @args);
- #warn ("ret=$ret in " . `pwd`);
+ # .blg open of abs path should fail
+ my $ret = &test_run ("./bibtex", "$srcdir/exampl.aux");
# The test fails if the program succeeded. Ideally we'd grep the output.
my $bad = ($ret == 0);