Skip to content

Commit 98360cd

Browse files
committed
Behavior tests
1 parent 521a9a6 commit 98360cd

File tree

47 files changed

+249
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+249
-0
lines changed

fluent/syntax/errors.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from __future__ import unicode_literals
2+
3+
14
class ParseError(Exception):
25
def __init__(self, code, *args):
36
self.code = code
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
key = { foo.23 }
2+
3+
//~ ERROR E0004, pos 12, args "a-zA-Z"
4+
5+
key = { foo. }
6+
7+
//~ ERROR E0004, pos 31, args "a-zA-Z"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
foo = Value
2+
.attr = Value 2
3+
//~ ERROR E0002, pos 12
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
key = Value
2+
.label =
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
key = Value
2+
.label
3+
//~ ERROR E0003, pos 22, args "="
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
key = { -2.4.5 }
2+
//~ ERROR E0003, pos 12, args "}"
3+
4+
key = { -2.4. }
5+
//~ ERROR E0003, pos 30, args "}"
6+
7+
key = { -.4 }
8+
//~ ERROR E0004, pos 44, args "0-9"
9+
10+
key = { -2..4 }
11+
//~ ERROR E0004, pos 61, args "0-9"
12+
13+
key = { 24d }
14+
//~ ERROR E0003, pos 77, args "}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
key = { BUILTIN(23, ) }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
key = { BUILTIN(2: "foo") }
2+
//~ ERROR E0009, pos 17
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
key = { BUILTIN(key: foo) }
2+
//~ ERROR E0006, pos 21, args "value"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This is a normal comment
2+
/ but this is not
3+
//~ ERROR E0003, pos 29, args "/"

0 commit comments

Comments
 (0)