diff options
author | Steven Knight <knight@baldmt.com> | 2005-11-28 15:38:55 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-11-28 15:38:55 (GMT) |
commit | ae34c4fe43a546089c123f99de190ff79733e848 (patch) | |
tree | 1381ee0bcb9a5a756d60de793fda0843b6faffc5 /test/TEX/PDFLATEX.py | |
parent | 78ed211cbfcb68bd3af0885f117bb0f75819c305 (diff) | |
download | SCons-ae34c4fe43a546089c123f99de190ff79733e848.zip SCons-ae34c4fe43a546089c123f99de190ff79733e848.tar.gz SCons-ae34c4fe43a546089c123f99de190ff79733e848.tar.bz2 |
Add a TeX emitter to cover removal of .aux and .log files. (Joel B. Mohler)
Diffstat (limited to 'test/TEX/PDFLATEX.py')
-rw-r--r-- | test/TEX/PDFLATEX.py | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/test/TEX/PDFLATEX.py b/test/TEX/PDFLATEX.py index 5dcfd0b..015db56 100644 --- a/test/TEX/PDFLATEX.py +++ b/test/TEX/PDFLATEX.py @@ -24,6 +24,12 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +""" +Validate that we can set the PDFLATEX string to our own utility, that +the produced .dvi, .aux and .log files get removed by the -c option, +and that we can use this to wrap calls to the real latex utility. +""" + import os import os.path import string @@ -41,10 +47,14 @@ import sys import os base_name = os.path.splitext(sys.argv[1])[0] infile = open(sys.argv[1], 'rb') -out_file = open(base_name+'.pdf', 'wb') +pdf_file = open(base_name+'.pdf', 'wb') +aux_file = open(base_name+'.aux', 'wb') +log_file = open(base_name+'.log', 'wb') for l in infile.readlines(): if l[0] != '\\': - out_file.write(l) + pdf_file.write(l) + aux_file.write(l) + log_file.write(l) sys.exit(0) """) @@ -62,11 +72,25 @@ test.write('test2.latex', r"""This is a .latex test. \end """) -test.run(arguments = '.', stderr = None) +test.run(arguments = '.') + +test.must_exist('test1.pdf') +test.must_exist('test1.aux') +test.must_exist('test1.log') + +test.must_exist('test2.pdf') +test.must_exist('test2.aux') +test.must_exist('test2.log') + +test.run(arguments = '-c .') -test.fail_test(not os.path.exists(test.workpath('test1.pdf'))) +test.must_not_exist('test1.pdf') +test.must_not_exist('test1.aux') +test.must_not_exist('test1.log') -test.fail_test(not os.path.exists(test.workpath('test2.pdf'))) +test.must_not_exist('test2.pdf') +test.must_not_exist('test2.aux') +test.must_not_exist('test2.log') @@ -104,14 +128,14 @@ This is the %s LaTeX file. test.run(arguments = 'foo.pdf', stderr = None) - test.fail_test(os.path.exists(test.workpath('wrapper.out'))) + test.must_not_exist('wrapper.out') - test.fail_test(not os.path.exists(test.workpath('foo.pdf'))) + test.must_exist('foo.pdf') test.run(arguments = 'bar.pdf', stderr = None) - test.fail_test(test.read('wrapper.out') != "wrapper.py\n") + test.must_match('wrapper.out', "wrapper.py\n") - test.fail_test(not os.path.exists(test.workpath('bar.pdf'))) + test.must_exist('bar.pdf') test.pass_test() |