ソースを参照

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)




読み込み中…
キャンセル
保存