aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/lexer/0011_keywords.rs2
-rw-r--r--tests/data/lexer/0011_keywords.txt6
-rw-r--r--tests/data/parser/ok/0007_extern_crate.rs2
-rw-r--r--tests/data/parser/ok/0007_extern_crate.txt22
4 files changed, 31 insertions, 1 deletions
diff --git a/tests/data/lexer/0011_keywords.rs b/tests/data/lexer/0011_keywords.rs
index 1f4a4a74c..4adb1587e 100644
--- a/tests/data/lexer/0011_keywords.rs
+++ b/tests/data/lexer/0011_keywords.rs
@@ -1 +1 @@
fn use struct trait enum impl true false fn use struct trait enum impl true false as extern crate
diff --git a/tests/data/lexer/0011_keywords.txt b/tests/data/lexer/0011_keywords.txt
index eded37084..bf8ceffd4 100644
--- a/tests/data/lexer/0011_keywords.txt
+++ b/tests/data/lexer/0011_keywords.txt
@@ -13,4 +13,10 @@ WHITESPACE 1 " "
13TRUE_KW 4 "true" 13TRUE_KW 4 "true"
14WHITESPACE 1 " " 14WHITESPACE 1 " "
15FALSE_KW 5 "false" 15FALSE_KW 5 "false"
16WHITESPACE 1 " "
17AS_KW 2 "as"
18WHITESPACE 1 " "
19EXTERN_KW 6 "extern"
20WHITESPACE 1 " "
21CRATE_KW 5 "crate"
16WHITESPACE 1 "\n" 22WHITESPACE 1 "\n"
diff --git a/tests/data/parser/ok/0007_extern_crate.rs b/tests/data/parser/ok/0007_extern_crate.rs
new file mode 100644
index 000000000..3ce336676
--- /dev/null
+++ b/tests/data/parser/ok/0007_extern_crate.rs
@@ -0,0 +1,2 @@
1extern crate foo;
2extern crate foo as bar;
diff --git a/tests/data/parser/ok/0007_extern_crate.txt b/tests/data/parser/ok/0007_extern_crate.txt
new file mode 100644
index 000000000..902c80f7d
--- /dev/null
+++ b/tests/data/parser/ok/0007_extern_crate.txt
@@ -0,0 +1,22 @@
1FILE@[0; 43)
2 EXTERN_CRATE_ITEM@[0; 18)
3 EXTERN_KW@[0; 6)
4 WHITESPACE@[6; 7)
5 CRATE_KW@[7; 12)
6 WHITESPACE@[12; 13)
7 IDENT@[13; 16)
8 SEMI@[16; 17)
9 WHITESPACE@[17; 18)
10 EXTERN_CRATE_ITEM@[18; 43)
11 EXTERN_KW@[18; 24)
12 WHITESPACE@[24; 25)
13 CRATE_KW@[25; 30)
14 WHITESPACE@[30; 31)
15 IDENT@[31; 34)
16 ALIAS@[34; 41)
17 WHITESPACE@[34; 35)
18 AS_KW@[35; 37)
19 WHITESPACE@[37; 38)
20 IDENT@[38; 41)
21 SEMI@[41; 42)
22 WHITESPACE@[42; 43)