aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/lexer/0011_keywords.rs3
-rw-r--r--tests/data/lexer/0011_keywords.txt4
-rw-r--r--tests/data/parser/err/0004_use_path_bad_segment.rs1
-rw-r--r--tests/data/parser/err/0004_use_path_bad_segment.txt16
-rw-r--r--tests/data/parser/ok/0012_visibility.txt2
-rw-r--r--tests/data/parser/ok/0013_use_path_self_super.rs3
-rw-r--r--tests/data/parser/ok/0013_use_path_self_super.txt50
7 files changed, 75 insertions, 4 deletions
diff --git a/tests/data/lexer/0011_keywords.rs b/tests/data/lexer/0011_keywords.rs
index c5a58a205..aa729cdbd 100644
--- a/tests/data/lexer/0011_keywords.rs
+++ b/tests/data/lexer/0011_keywords.rs
@@ -1,2 +1 @@
1fn use struct trait enum impl true false as extern crate mod pub self super fn use struct trait enum impl true false as extern crate mod pub self super in
2
diff --git a/tests/data/lexer/0011_keywords.txt b/tests/data/lexer/0011_keywords.txt
index 248628f34..8a1f525ac 100644
--- a/tests/data/lexer/0011_keywords.txt
+++ b/tests/data/lexer/0011_keywords.txt
@@ -27,4 +27,6 @@ WHITESPACE 1 " "
27SELF_KW 4 "self" 27SELF_KW 4 "self"
28WHITESPACE 1 " " 28WHITESPACE 1 " "
29SUPER_KW 5 "super" 29SUPER_KW 5 "super"
30WHITESPACE 2 "\n\n" 30WHITESPACE 1 " "
31IN_KW 2 "in"
32WHITESPACE 1 "\n"
diff --git a/tests/data/parser/err/0004_use_path_bad_segment.rs b/tests/data/parser/err/0004_use_path_bad_segment.rs
new file mode 100644
index 000000000..060e65d06
--- /dev/null
+++ b/tests/data/parser/err/0004_use_path_bad_segment.rs
@@ -0,0 +1 @@
use foo::92; \ No newline at end of file
diff --git a/tests/data/parser/err/0004_use_path_bad_segment.txt b/tests/data/parser/err/0004_use_path_bad_segment.txt
new file mode 100644
index 000000000..241ee8562
--- /dev/null
+++ b/tests/data/parser/err/0004_use_path_bad_segment.txt
@@ -0,0 +1,16 @@
1FILE@[0; 12)
2 USE_ITEM@[0; 9)
3 USE_KW@[0; 3)
4 PATH@[3; 9)
5 PATH@[3; 7)
6 PATH_SEGMENT@[3; 7)
7 WHITESPACE@[3; 4)
8 IDENT@[4; 7)
9 COLONCOLON@[7; 9)
10 PATH_SEGMENT@[9; 9)
11 err: `expected identifier`
12 err: `expected SEMI`
13 ERROR@[9; 12)
14 err: `expected item`
15 INT_NUMBER@[9; 11)
16 SEMI@[11; 12)
diff --git a/tests/data/parser/ok/0012_visibility.txt b/tests/data/parser/ok/0012_visibility.txt
index 8324c48d5..0e091724d 100644
--- a/tests/data/parser/ok/0012_visibility.txt
+++ b/tests/data/parser/ok/0012_visibility.txt
@@ -58,7 +58,7 @@ FILE@[0; 98)
58 VISIBILITY@[66; 88) 58 VISIBILITY@[66; 88)
59 PUB_KW@[66; 69) 59 PUB_KW@[66; 69)
60 L_PAREN@[69; 70) 60 L_PAREN@[69; 70)
61 IDENT@[70; 72) 61 IN_KW@[70; 72)
62 PATH@[72; 86) 62 PATH@[72; 86)
63 PATH@[72; 81) 63 PATH@[72; 81)
64 PATH@[72; 76) 64 PATH@[72; 76)
diff --git a/tests/data/parser/ok/0013_use_path_self_super.rs b/tests/data/parser/ok/0013_use_path_self_super.rs
new file mode 100644
index 000000000..faf6a42c7
--- /dev/null
+++ b/tests/data/parser/ok/0013_use_path_self_super.rs
@@ -0,0 +1,3 @@
1use self::foo;
2use super::super::bar;
3use ::self::a::super::bar;
diff --git a/tests/data/parser/ok/0013_use_path_self_super.txt b/tests/data/parser/ok/0013_use_path_self_super.txt
new file mode 100644
index 000000000..90bbb9b2d
--- /dev/null
+++ b/tests/data/parser/ok/0013_use_path_self_super.txt
@@ -0,0 +1,50 @@
1FILE@[0; 65)
2 USE_ITEM@[0; 15)
3 USE_KW@[0; 3)
4 PATH@[3; 13)
5 PATH@[3; 8)
6 PATH_SEGMENT@[3; 8)
7 WHITESPACE@[3; 4)
8 SELF_KW@[4; 8)
9 COLONCOLON@[8; 10)
10 PATH_SEGMENT@[10; 13)
11 IDENT@[10; 13)
12 SEMI@[13; 14)
13 WHITESPACE@[14; 15)
14 USE_ITEM@[15; 38)
15 USE_KW@[15; 18)
16 PATH@[18; 36)
17 PATH@[18; 31)
18 PATH@[18; 24)
19 PATH_SEGMENT@[18; 24)
20 WHITESPACE@[18; 19)
21 SUPER_KW@[19; 24)
22 COLONCOLON@[24; 26)
23 PATH_SEGMENT@[26; 31)
24 SUPER_KW@[26; 31)
25 COLONCOLON@[31; 33)
26 PATH_SEGMENT@[33; 36)
27 IDENT@[33; 36)
28 SEMI@[36; 37)
29 WHITESPACE@[37; 38)
30 USE_ITEM@[38; 65)
31 USE_KW@[38; 41)
32 PATH@[41; 63)
33 PATH@[41; 58)
34 PATH@[41; 51)
35 PATH@[41; 48)
36 PATH_SEGMENT@[41; 48)
37 WHITESPACE@[41; 42)
38 COLONCOLON@[42; 44)
39 SELF_KW@[44; 48)
40 COLONCOLON@[48; 50)
41 PATH_SEGMENT@[50; 51)
42 IDENT@[50; 51)
43 COLONCOLON@[51; 53)
44 PATH_SEGMENT@[53; 58)
45 SUPER_KW@[53; 58)
46 COLONCOLON@[58; 60)
47 PATH_SEGMENT@[60; 63)
48 IDENT@[60; 63)
49 SEMI@[63; 64)
50 WHITESPACE@[64; 65)