Browse Source

Adjust test for new language dict.

tags/v1.0^2
Benjamin Attal 10 years ago
parent
commit
5e6e3fcbf5
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      bitshift/parser/__init__.py
  2. +1
    -1
      test/parser_test.py

+ 2
- 1
bitshift/parser/__init__.py View File

@@ -21,7 +21,8 @@ def _lang(codelet):


if codelet.filename is not None: if codelet.filename is not None:
try: try:
return pgl.guess_lexer_for_filename(codelet.filename, codelet.code).name
return LANGS.index(
pgl.get_lexer_for_filename(codelet.filename).name)
except: except:
raise UnsupportedFileError('Could not find a lexer for the codelet\'s filename') raise UnsupportedFileError('Could not find a lexer for the codelet\'s filename')




+ 1
- 1
test/parser_test.py View File

@@ -21,7 +21,7 @@ if __name__ == '__main__':


elif sys.argv[1] == 'ruby': elif sys.argv[1] == 'ruby':
file_name = "resources/parser.rb" file_name = "resources/parser.rb"
server_socket_number = 5003
server_socket_number = 5065


server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_socket.connect(("localhost", server_socket_number)) server_socket.connect(("localhost", server_socket_number))


Loading…
Cancel
Save