From 7d821df03f20eb5c0379c04ea407c75f2436502f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 29 Jan 2011 00:32:02 +0000 Subject: make .tex and test.pl use the same name, report exact popen call if debugging git-svn-id: svn://tug.org/texlive/trunk@21216 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipsk/ChangeLog | 7 +++++++ Build/source/texk/dvipsk/quotecmd-test.pl | 9 ++++++--- Build/source/texk/dvipsk/search.c | 4 ++++ Build/source/texk/dvipsk/testdata/quotecmd.dvi | Bin 200 -> 196 bytes Build/source/texk/dvipsk/testdata/quotecmd.tex | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index de49006cecb..be235c6e704 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,10 @@ +2011-01-29 Karl Berry + + * search.c (search): report the actual popen call if D_FILES. + * quotecmd.tex: make test filename match quotecmd-test.pl. + * quotecmd.dvi: regenerate. + * quotecmd-test.pl: doc fixes. + 2011-01-28 Peter Breitenlohner * Makefile.am: Add testdata/quotecmd.dvi to EXTRA_DIST. diff --git a/Build/source/texk/dvipsk/quotecmd-test.pl b/Build/source/texk/dvipsk/quotecmd-test.pl index 7e228a27dfd..47ea252d037 100755 --- a/Build/source/texk/dvipsk/quotecmd-test.pl +++ b/Build/source/texk/dvipsk/quotecmd-test.pl @@ -11,10 +11,13 @@ exit (&main ()); sub main { # create the weirdly-named file which dvips executes with popen. - # quotecmd.tex itself also creates it, but we don't want to run TeX in + # quotecmd.tex also creates it, but we don't want to run TeX in # this test, nor do we want such a weirdly-named file in our - # repository, so create it here. Leave it in place, so we can run the - # program under the debugger if we need to. + # repository, so create it here. The names here and in quotecmd.tex + # must match exactly or the test won't be testing what it should. + # + # Leave the file in place, so we can conveniently run dvips under the + # debugger if we need to. my $weirdf = ' 2>&1 | echo badnews >pwned.txt #.gz'; unlink ($weirdf); # ensure no leftover open (WEIRDF, ">", $weirdf); diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c index 193007c4688..be5e1ab35e8 100644 --- a/Build/source/texk/dvipsk/search.c +++ b/Build/source/texk/dvipsk/search.c @@ -162,6 +162,10 @@ search(kpse_file_format_type format, const char *file, const char *mode) char *prog = selfautoloc_prog (GUNZIP); cmd = concat3 (prog, " -c ", quoted_name); ret = popen (cmd, "r"); + if (dd(D_FILES)) { + fprintf(stderr, "popen(%s) %s\n", cmd, + popen == NULL ? "failed" : "succeeded"); + } SET_BINARY(fileno(ret)); to_close = USE_PCLOSE; free (cmd); diff --git a/Build/source/texk/dvipsk/testdata/quotecmd.dvi b/Build/source/texk/dvipsk/testdata/quotecmd.dvi index d5daaa80656..2e78f61e52d 100644 Binary files a/Build/source/texk/dvipsk/testdata/quotecmd.dvi and b/Build/source/texk/dvipsk/testdata/quotecmd.dvi differ diff --git a/Build/source/texk/dvipsk/testdata/quotecmd.tex b/Build/source/texk/dvipsk/testdata/quotecmd.tex index 9e6b14c27f4..f65fe3f8817 100644 --- a/Build/source/texk/dvipsk/testdata/quotecmd.tex +++ b/Build/source/texk/dvipsk/testdata/quotecmd.tex @@ -3,7 +3,7 @@ % with ideas from Alexander Cherepanov. \catcode`\# = 12 -\def\cmd{" 2>&1 | echo badnews > pwned.txt #.gz"} +\def\cmd{" 2>&1 | echo badnews >pwned.txt #.gz"} % create this weirdly-named file. \catcode0 = 12 -- cgit v1.2.3