diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-05-04 12:02:57 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-05-04 12:02:57 (GMT) |
commit | f96b105c4c523f898d53d11c601360e2ac8468d8 (patch) | |
tree | 8fd5d0407ec7f684ba527ada59a44ef91686d68b | |
parent | 74a93e84cce4f50af3c1ec0b8eaa7d88d57370a6 (diff) | |
download | SCons-f96b105c4c523f898d53d11c601360e2ac8468d8.zip SCons-f96b105c4c523f898d53d11c601360e2ac8468d8.tar.gz SCons-f96b105c4c523f898d53d11c601360e2ac8468d8.tar.bz2 |
Fix TEX auxiliary test by normalizing ps output to avoid spurious failures (from Rob Managan)
-rw-r--r-- | QMTest/TestSCons.py | 12 | ||||
-rw-r--r-- | test/TEX/auxiliaries.py | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index 17a2018..36eb407 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -547,6 +547,18 @@ class TestSCons(TestCommon): x = x.replace('line 1,', 'line %s,' % line) return x + def normalize_ps(self, s): + s = re.sub(r'(Creation|Mod)Date: .*', + r'\1Date XXXX', s) + s = re.sub(r'%DVIPSSource:\s+TeX output\s.*', + r'%DVIPSSource: TeX output XXXX', s) + s = re.sub(r'/(BaseFont|FontName) /[A-Z0-9]{6}', + r'/\1 /XXXXXX', s) + s = re.sub(r'BeginFont: [A-Z0-9]{6}', + r'BeginFont: XXXXXX', s) + + return s + def normalize_pdf(self, s): s = re.sub(r'/(Creation|Mod)Date \(D:[^)]*\)', r'/\1Date (D:XXXX)', s) diff --git a/test/TEX/auxiliaries.py b/test/TEX/auxiliaries.py index f69b6e6..f6d7cb8 100644 --- a/test/TEX/auxiliaries.py +++ b/test/TEX/auxiliaries.py @@ -151,6 +151,9 @@ if pdf_output_1 != pdf_output_2: sys.stdout.flush() test.fail_test() +ps_output_1 = test.normalize_ps(ps_output_1) +ps_output_2 = test.normalize_ps(ps_output_2) + if ps_output_1 != ps_output_2: import sys sys.stdout.write("***** 1.ps and 2.ps are different!\n") |