summaryrefslogtreecommitdiffstats
path: root/test/DVIPDF
diff options
context:
space:
mode:
Diffstat (limited to 'test/DVIPDF')
-rw-r--r--test/DVIPDF/DVIPDFCOM.py16
-rw-r--r--test/DVIPDF/DVIPDFCOMSTR.py16
2 files changed, 4 insertions, 28 deletions
diff --git a/test/DVIPDF/DVIPDFCOM.py b/test/DVIPDF/DVIPDFCOM.py
index 362279e..ddc42b6 100644
--- a/test/DVIPDF/DVIPDFCOM.py
+++ b/test/DVIPDF/DVIPDFCOM.py
@@ -34,21 +34,11 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('mypdf.py', """
-import sys
-outfile = open(sys.argv[1], 'wb')
-for f in sys.argv[2:]:
- infile = open(f, 'rb')
- for l in [l for l in infile.readlines() if l != '/*pdf*/\\n']:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
test.write('SConstruct', """
env = Environment(tools=['default', 'dvipdf'],
- DVIPDFCOM = r'%(_python_)s mypdf.py $TARGET $SOURCES')
+ DVIPDFCOM = r'%(_python_)s mycompile.py pdf $TARGET $SOURCES')
env.PDF(target = 'aaa', source = 'aaa.dvi')
""" % locals())
@@ -58,8 +48,6 @@ test.run()
test.must_match('aaa.pdf', "aaa.dvi\n")
-
-
test.pass_test()
# Local Variables:
diff --git a/test/DVIPDF/DVIPDFCOMSTR.py b/test/DVIPDF/DVIPDFCOMSTR.py
index 0063e84..7cf221c 100644
--- a/test/DVIPDF/DVIPDFCOMSTR.py
+++ b/test/DVIPDF/DVIPDFCOMSTR.py
@@ -35,21 +35,11 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('mypdf.py', """
-import sys
-outfile = open(sys.argv[1], 'wb')
-for f in sys.argv[2:]:
- infile = open(f, 'rb')
- for l in [l for l in infile.readlines() if l != '/*pdf*/\\n']:
- outfile.write(l)
-sys.exit(0)
-""")
+test.file_fixture('mycompile.py')
test.write('SConstruct', """
env = Environment(tools=['default', 'dvipdf'],
- DVIPDFCOM = r'%(_python_)s mypdf.py $TARGET $SOURCES',
+ DVIPDFCOM = r'%(_python_)s mycompile.py pdf $TARGET $SOURCES',
DVIPDFCOMSTR = 'DVIPDFing $TARGET from $SOURCE')
env.PDF(target = 'aaa', source = 'aaa.dvi')
""" % locals())
@@ -62,8 +52,6 @@ DVIPDFing aaa.pdf from aaa.dvi
test.must_match('aaa.pdf', "aaa.dvi\n")
-
-
test.pass_test()
# Local Variables: