Commits

Gary Oberbrunner committed cb4d763

Fix TEX auxiliary test by normalizing ps output to avoid spurious failures (from Rob Managan)

  • Participants
  • Parent commits 5d3f7f7

Comments (0)

Files changed (2)

File QMTest/TestSCons.py

         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)

File test/TEX/auxiliaries.py

     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")