Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
arpeggio-gm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
arpeggio-gm
Commits
b61c70ec
Commit
b61c70ec
authored
Sep 30, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test for unicode characters in the grammar
parent
5df7664c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
test_unicode.py
tests/unit/test_unicode.py
+27
-0
No files found.
tests/unit/test_unicode.py
0 → 100644
View file @
b61c70ec
# -*- coding: utf-8 -*-
#######################################################################
# Name: test_unicode
# Purpose: Tests matching unicode characters
# Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com>
# Copyright: (c) 2014 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com>
# License: MIT License
#######################################################################
from
__future__
import
unicode_literals
import
pytest
# Grammar
from
arpeggio
import
ParserPython
def
grammar
():
return
first
,
"±"
,
second
def
first
():
return
"♪"
def
second
():
return
"a"
def
test_unicode_match
():
parser
=
ParserPython
(
grammar
)
parse_tree
=
parser
.
parse
(
"♪ ± a"
)
assert
parse_tree
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment