Commits

gbrandl  committed e544a6e

[svn] Make test suite work again.

  • Participants
  • Parent commits bc785c5
  • Branches trunk

Comments (0)

Files changed (6)

     * (Q)BASIC
     * lisp
     * python TBs
+    * IPython sessions
     * ls -alG
     * HTML with special formatting?
     * latex special formatting?

File pygments/__init__.py

 import sys, os
 from cStringIO import StringIO
 
-from pygments.util import OptionError
-from pygments.lexers import LEXERS, get_lexer_by_name, get_lexer_for_filename
-
-from pygments.formatters import FORMATTERS, get_formatter_by_name, \
-     get_formatter_for_filename, TerminalFormatter
-
 
 def lex(code, lexer):
     """

File pygments/cmdline.py

     :copyright: 2006 by Georg Brandl.
     :license: BSD, see LICENSE for more details.
 """
+import sys
 import getopt
 
+from pygments import __version__, __author__, highlight
+from pygments.lexers import LEXERS, get_lexer_by_name, get_lexer_for_filename
+from pygments.util import OptionError
+from pygments.formatters import FORMATTERS, get_formatter_by_name, \
+     get_formatter_for_filename, TerminalFormatter
+
+
 def main(args):
     """
     Main command line entry point.
             return 2
 
         # print version
-        cmdline_main(['', '-V'])
+        main(['', '-V'])
         print
         print "Lexers:"
         print "~~~~~~~"

File pygments/formatters/html.py

         if self.nowrap:
             self._format_nowrap(tokensource, outfile)
             return
-        
+
         realoutfile = outfile
         lnos = self.linenos
         full = self.full
                                        code      = ret))
                 try:
                     cf = open(cssfilename, "w")
-                    cf.write(CSSFILE_TEMPLATE % dict(styledefs=self.get_style_defs('body')))
+                    cf.write(CSSFILE_TEMPLATE % {'styledefs':
+                                                 self.get_style_defs('body')})
                     cf.close()
                 except IOError, err:
                     err.strerror = 'Error writing CSS file: ' + err.strerror

File pygments/lexers/agile.py

              r'sysseek|system|syswrite|tell|telldir|tie|tied|time|times|tr|'
              r'truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|'
              r'utime|values|vec|wait|waitpid|wantarray|warn|write'
-             r'|y)\b', Name.Builtin),
+             r')\b', Name.Builtin),
             (r'((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\b', Name.Builtin.Pseudo),
             (r'<<([a-zA-Z_][a-zA-Z0-9_]*)\n.*?\n\1\n', String),
             (r'__END__', Comment.Preproc, 'end-part'),

File tests/test_cmdline.py

 import sys, os
 import unittest
 import StringIO
+
 from pygments import cmdline_main, highlight