소스 검색

Add test for nearley include of unicode

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.5.1
Kaspar Emanuel 7 년 전
부모
커밋
e05c62ca06
3개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -0
      tests/test_nearley/grammars/include_unicode.ne
  2. +1
    -1
      tests/test_nearley/grammars/unicode.ne
  3. +4
    -0
      tests/test_nearley/test_nearley.py

+ 3
- 0
tests/test_nearley/grammars/include_unicode.ne 파일 보기

@@ -0,0 +1,3 @@
@include "unicode.ne"

main -> x

+ 1
- 1
tests/test_nearley/grammars/unicode.ne 파일 보기

@@ -1 +1 @@
main -> "±a"
x -> "±a"

+ 4
- 0
tests/test_nearley/test_nearley.py 파일 보기

@@ -73,6 +73,10 @@ class TestNearley(unittest.TestCase):

def test_utf8_2(self):
fn = os.path.join(TEST_PATH, 'grammars/unicode.ne')
nearley_tool_main(fn, 'x', NEARLEY_PATH)

def test_include_utf8(self):
fn = os.path.join(TEST_PATH, 'grammars/include_unicode.ne')
nearley_tool_main(fn, 'main', NEARLEY_PATH)




불러오는 중...
취소
저장