summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tests/bibtex-openout-test.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-01-13 01:18:02 +0000
committerKarl Berry <karl@freefriends.org>2010-01-13 01:18:02 +0000
commit2c3f4ac000585f4d975117d6000cbfd574070fef (patch)
tree4472d9ffb35f46e81df4b31ff5a367e1816dc042 /Build/source/texk/web2c/tests/bibtex-openout-test.pl
parent8a0ac1c324c5add345d500a13d24dcdb5785d9cb (diff)
start at testing restricted \write18 and quotes, plus factoring out common test functions
git-svn-id: svn://tug.org/texlive/trunk@16695 c570f23f-e606-0410-a88d-b1316a301751
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);