diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-11-25 23:52:42 +0000 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-11-25 23:52:42 +0000 |
commit | d9e3f782457631a465506d568bb9b460762a978a (patch) | |
tree | a80534f8606d23bc2d634a926095d1f380a718f8 /test/TEX | |
parent | 2106942105005e61485ea4b6b488f0c5e5d38436 (diff) | |
parent | e237252d1d1f6a2dae058014d2e597081d9ad0cc (diff) | |
download | scons-d9e3f782457631a465506d568bb9b460762a978a.tar.gz |
Merged in ricklupton/scons (pull request #374)
Find dependencies using LaTeX "import" package commands (updated)
Diffstat (limited to 'test/TEX')
-rw-r--r-- | test/TEX/LATEX.py | 6 | ||||
-rw-r--r-- | test/TEX/LATEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/LATEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/LATEXFLAGS.py | 6 | ||||
-rw-r--r-- | test/TEX/PDFLATEX.py | 6 | ||||
-rw-r--r-- | test/TEX/PDFLATEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFLATEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFLATEXFLAGS.py | 6 | ||||
-rw-r--r-- | test/TEX/PDFTEX.py | 6 | ||||
-rw-r--r-- | test/TEX/PDFTEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFTEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFTEXFLAGS.py | 6 | ||||
-rw-r--r-- | test/TEX/TEX.py | 6 | ||||
-rw-r--r-- | test/TEX/TEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/TEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/TEXFLAGS.py | 6 |
16 files changed, 24 insertions, 152 deletions
diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index 03d3a007..c6f58e62 100644 --- a/test/TEX/LATEX.py +++ b/test/TEX/LATEX.py @@ -96,11 +96,7 @@ latex = test.where_is('latex') if latex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/LATEXCOM.py b/test/TEX/LATEXCOM.py index 2c638645..878d4cf6 100644 --- a/test/TEX/LATEXCOM.py +++ b/test/TEX/LATEXCOM.py @@ -31,24 +31,14 @@ Test the ability to configure the $LATEXCOM construction variable. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mylatex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*latex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['latex'], - LATEXCOM = r'%(_python_)s mylatex.py $TARGET $SOURCE') + LATEXCOM = r'%(_python_)s mycompile.py latex $TARGET $SOURCE') env.DVI('test1', 'test1.latex') """ % locals()) @@ -61,8 +51,6 @@ test.run() test.must_match('test1.dvi', "test1.latex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/LATEXCOMSTR.py b/test/TEX/LATEXCOMSTR.py index 4e1b93c2..f8a377db 100644 --- a/test/TEX/LATEXCOMSTR.py +++ b/test/TEX/LATEXCOMSTR.py @@ -32,24 +32,14 @@ the C compilation output. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mylatex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*latex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['latex'], - LATEXCOM = r'%(_python_)s mylatex.py $TARGET $SOURCE', + LATEXCOM = r'%(_python_)s mycompile.py latex $TARGET $SOURCE', LATEXCOMSTR = 'Building $TARGET from $SOURCE') env.DVI('test1', 'test1.latex') """ % locals()) @@ -65,8 +55,6 @@ Building test1.dvi from test1.latex test.must_match('test1.dvi', "test1.latex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/LATEXFLAGS.py b/test/TEX/LATEXFLAGS.py index f693970b..46e0479d 100644 --- a/test/TEX/LATEXFLAGS.py +++ b/test/TEX/LATEXFLAGS.py @@ -80,11 +80,7 @@ latex = test.where_is('latex') if latex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/PDFLATEX.py b/test/TEX/PDFLATEX.py index dbae623c..dece3859 100644 --- a/test/TEX/PDFLATEX.py +++ b/test/TEX/PDFLATEX.py @@ -96,11 +96,7 @@ pdflatex = test.where_is('pdflatex') if pdflatex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/PDFLATEXCOM.py b/test/TEX/PDFLATEXCOM.py index 09283f30..c2b54ce0 100644 --- a/test/TEX/PDFLATEXCOM.py +++ b/test/TEX/PDFLATEXCOM.py @@ -31,24 +31,14 @@ Test the ability to configure the $PDFLATEXCOM construction variable. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mypdflatex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*latex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['pdflatex'], - PDFLATEXCOM = r'%(_python_)s mypdflatex.py $TARGET $SOURCE') + PDFLATEXCOM = r'%(_python_)s mycompile.py latex $TARGET $SOURCE') env.PDF('test1', 'test1.latex') """ % locals()) @@ -61,8 +51,6 @@ test.run() test.must_match('test1.pdf', "test1.latex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/PDFLATEXCOMSTR.py b/test/TEX/PDFLATEXCOMSTR.py index c751e8e4..1d911bdb 100644 --- a/test/TEX/PDFLATEXCOMSTR.py +++ b/test/TEX/PDFLATEXCOMSTR.py @@ -33,24 +33,14 @@ the C compilation output. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mypdflatex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*latex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['pdflatex'], - PDFLATEXCOM = r'%(_python_)s mypdflatex.py $TARGET $SOURCE', + PDFLATEXCOM = r'%(_python_)s mycompile.py latex $TARGET $SOURCE', PDFLATEXCOMSTR = 'Building $TARGET from $SOURCE') env.PDF('test1', 'test1.latex') """ % locals()) @@ -66,8 +56,6 @@ Building test1.pdf from test1.latex test.must_match('test1.pdf', "test1.latex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/PDFLATEXFLAGS.py b/test/TEX/PDFLATEXFLAGS.py index deee9ede..ffed20b1 100644 --- a/test/TEX/PDFLATEXFLAGS.py +++ b/test/TEX/PDFLATEXFLAGS.py @@ -80,11 +80,7 @@ pdflatex = test.where_is('pdflatex') if pdflatex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/PDFTEX.py b/test/TEX/PDFTEX.py index 321a58ae..5a958d59 100644 --- a/test/TEX/PDFTEX.py +++ b/test/TEX/PDFTEX.py @@ -83,11 +83,7 @@ pdftex = test.where_is('pdftex') if pdftex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/PDFTEXCOM.py b/test/TEX/PDFTEXCOM.py index 8c31da3b..6e915a4f 100644 --- a/test/TEX/PDFTEXCOM.py +++ b/test/TEX/PDFTEXCOM.py @@ -31,24 +31,14 @@ Test the ability to configure the $PDFTEXCOM construction variable. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mypdftex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*tex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['pdftex'], - PDFTEXCOM = r'%(_python_)s mypdftex.py $TARGET $SOURCE') + PDFTEXCOM = r'%(_python_)s mycompile.py tex $TARGET $SOURCE') env.PDF('test1') """ % locals()) @@ -61,8 +51,6 @@ test.run() test.must_match('test1.pdf', "test1.tex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/PDFTEXCOMSTR.py b/test/TEX/PDFTEXCOMSTR.py index 13abe7a3..7ee5b41b 100644 --- a/test/TEX/PDFTEXCOMSTR.py +++ b/test/TEX/PDFTEXCOMSTR.py @@ -33,24 +33,14 @@ the C compilation output. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mypdftex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*tex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['pdftex'], - PDFTEXCOM = r'%(_python_)s mypdftex.py $TARGET $SOURCE', + PDFTEXCOM = r'%(_python_)s mycompile.py tex $TARGET $SOURCE', PDFTEXCOMSTR = 'Building $TARGET from $SOURCE') env.PDF('test1') """ % locals()) @@ -66,8 +56,6 @@ Building test1.pdf from test1.tex test.must_match('test1.pdf', "test1.tex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/PDFTEXFLAGS.py b/test/TEX/PDFTEXFLAGS.py index ce27e82d..06dc780b 100644 --- a/test/TEX/PDFTEXFLAGS.py +++ b/test/TEX/PDFTEXFLAGS.py @@ -73,11 +73,7 @@ pdftex = test.where_is('pdftex') if pdftex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/TEX.py b/test/TEX/TEX.py index e1d634fc..3e484192 100644 --- a/test/TEX/TEX.py +++ b/test/TEX/TEX.py @@ -86,11 +86,7 @@ tex = test.where_is('tex') if tex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os diff --git a/test/TEX/TEXCOM.py b/test/TEX/TEXCOM.py index 1cadd634..9d820bc5 100644 --- a/test/TEX/TEXCOM.py +++ b/test/TEX/TEXCOM.py @@ -31,24 +31,14 @@ Test the ability to configure the $TEXCOM construction variable. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mytex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*tex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['tex'], - TEXCOM = r'%(_python_)s mytex.py $TARGET $SOURCE') + TEXCOM = r'%(_python_)s mycompile.py tex $TARGET $SOURCE') env.DVI('test1') """ % locals()) @@ -61,8 +51,6 @@ test.run() test.must_match('test1.dvi', "test1.tex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/TEXCOMSTR.py b/test/TEX/TEXCOMSTR.py index f1ead7fb..0facc6f0 100644 --- a/test/TEX/TEXCOMSTR.py +++ b/test/TEX/TEXCOMSTR.py @@ -32,24 +32,14 @@ the C compilation output. import TestSCons _python_ = TestSCons._python_ -_exe = TestSCons._exe test = TestSCons.TestSCons() - - -test.write('mytex.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*tex*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['tex'], - TEXCOM = r'%(_python_)s mytex.py $TARGET $SOURCE', + TEXCOM = r'%(_python_)s mycompile.py tex $TARGET $SOURCE', TEXCOMSTR = 'Building $TARGET from $SOURCE') env.DVI('test1') """ % locals()) @@ -65,8 +55,6 @@ Building test1.dvi from test1.tex test.must_match('test1.dvi', "test1.tex\n") - - test.pass_test() # Local Variables: diff --git a/test/TEX/TEXFLAGS.py b/test/TEX/TEXFLAGS.py index 7ae86ffc..e21aaa90 100644 --- a/test/TEX/TEXFLAGS.py +++ b/test/TEX/TEXFLAGS.py @@ -73,11 +73,7 @@ tex = test.where_is('tex') if tex: - test.write("wrapper.py", """import os -import sys -open('%s', 'wb').write("wrapper.py\\n") -os.system(" ".join(sys.argv[1:])) -""" % test.workpath('wrapper.out').replace('\\', '\\\\')) + test.file_fixture('wrapper.py') test.write('SConstruct', """ import os |