瀏覽代碼

Adjust test for new language dict.

tags/v1.0^2
Benjamin Attal 10 年之前
父節點
當前提交
65a2688be9
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. +2
    -1
      bitshift/parser/__init__.py
  2. +1
    -1
      test/parser_test.py

+ 2
- 1
bitshift/parser/__init__.py 查看文件

@@ -27,11 +27,12 @@ def _lang(codelet):

try:
if codelet.filename:
lex = pgl.guess_lexer_for_filename(codelet.filename, codelet.code)
lex = pgl.get_lexer_for_filename(codelet.filename)
else:
lex = pgl.guess_lexer(codelet.code)
except util.ClassNotFound:
raise UnsupportedFileError(codelet.filename)

return LANGS.index(lex.name)

def _recv_data(server_socket):


+ 1
- 1
test/parser_test.py 查看文件

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

elif sys.argv[1] == 'ruby':
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.connect(("localhost", server_socket_number))


Loading…
取消
儲存