diff options
author | William Blevins <wblevins001@gmail.com> | 2016-10-03 06:08:04 (GMT) |
---|---|---|
committer | William Blevins <wblevins001@gmail.com> | 2016-10-03 06:08:04 (GMT) |
commit | 5587089a661a520a32c353ea886939cd63a0636a (patch) | |
tree | 22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/TEX | |
parent | 6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff) | |
download | SCons-5587089a661a520a32c353ea886939cd63a0636a.zip SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.gz SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.bz2 |
Moved common my<xxx>.py functions to global fixture and resolve byte/str.
Diffstat (limited to 'test/TEX')
-rw-r--r-- | test/TEX/LATEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/LATEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFLATEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFLATEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFTEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/PDFTEXCOMSTR.py | 16 | ||||
-rw-r--r-- | test/TEX/TEXCOM.py | 16 | ||||
-rw-r--r-- | test/TEX/TEXCOMSTR.py | 16 |
8 files changed, 16 insertions, 112 deletions
diff --git a/test/TEX/LATEXCOM.py b/test/TEX/LATEXCOM.py index 2c63864..878d4cf 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 4e1b93c..f8a377d 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/PDFLATEXCOM.py b/test/TEX/PDFLATEXCOM.py index 09283f3..c2b54ce 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 c751e8e..1d911bd 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/PDFTEXCOM.py b/test/TEX/PDFTEXCOM.py index 8c31da3..6e915a4 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 13abe7a..7ee5b41 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/TEXCOM.py b/test/TEX/TEXCOM.py index 1cadd63..9d820bc 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 f1ead7f..0facc6f 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: |