update tests
This commit is contained in:
parent
2a5e44eba2
commit
f44e4455db
4 changed files with 170 additions and 13 deletions
|
|
@ -21,6 +21,8 @@ function generateTestData() {
|
|||
|
||||
docs.forEach(function(docName) {
|
||||
var p = docName.toLowerCase().split(".");
|
||||
if (!p[1])
|
||||
return;
|
||||
var modeName;
|
||||
if (modes.indexOf(p[0]) != -1)
|
||||
modeName = p[0];
|
||||
|
|
@ -35,7 +37,12 @@ function generateTestData() {
|
|||
}
|
||||
|
||||
var text = fs.readFileSync(cwd + filePath, "utf8");
|
||||
var Mode = require("../" + modeName).Mode;
|
||||
try {
|
||||
var Mode = require("../" + modeName).Mode;
|
||||
} catch(e) {
|
||||
console.warn("Can't load mode :" + modeName, e);
|
||||
return;
|
||||
}
|
||||
var tokenizer = new Mode().getTokenizer();
|
||||
|
||||
var state = "start";
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ function foo(items, nada) {
|
|||
alert(items[i] + "juhu\n");
|
||||
} // Real Tab.
|
||||
}
|
||||
|
||||
r = /d{1,2}?f{e}++r*?\d+?[]r[^r-o\f\f[\f]?r{7}+r\{7}+rr--rr$^(?:d|s)(?=a|)(?!y)[]|$?|^*/ o
|
||||
a=/a/ jk = / / / / /
|
||||
/************************************/
|
||||
/** total mess, tricky to highlight**/
|
||||
|
||||
|
|
|
|||
|
|
@ -140,6 +140,151 @@
|
|||
"paren.rparen"
|
||||
]
|
||||
},
|
||||
{
|
||||
"state": "start",
|
||||
"values": [],
|
||||
"types": []
|
||||
},
|
||||
{
|
||||
"state": "start",
|
||||
"values": [
|
||||
"r",
|
||||
" ",
|
||||
"=",
|
||||
" ",
|
||||
"/d",
|
||||
"{1,2}",
|
||||
"?",
|
||||
"f{e}",
|
||||
"++",
|
||||
"r",
|
||||
"*?",
|
||||
"\\d",
|
||||
"+?[]",
|
||||
"r",
|
||||
"[^",
|
||||
"r",
|
||||
"-",
|
||||
"o",
|
||||
"\\f",
|
||||
"\\f",
|
||||
"[",
|
||||
"\\f",
|
||||
"]",
|
||||
"?",
|
||||
"r",
|
||||
"{7}+",
|
||||
"r",
|
||||
"\\{",
|
||||
"7}",
|
||||
"+",
|
||||
"rr--rr",
|
||||
"$",
|
||||
"^",
|
||||
"(?:",
|
||||
"d|s",
|
||||
")",
|
||||
"(?=",
|
||||
"a|",
|
||||
")",
|
||||
"(?!",
|
||||
"y",
|
||||
")[]",
|
||||
"|",
|
||||
"$",
|
||||
"?",
|
||||
"|",
|
||||
"^*",
|
||||
"/",
|
||||
" ",
|
||||
"o"
|
||||
],
|
||||
"types": [
|
||||
"identifier",
|
||||
"text",
|
||||
"keyword.operator",
|
||||
"text",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"invalid",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"regexp.keyword.operator",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"string.regexp.charachterclass",
|
||||
"constant.language.escape",
|
||||
"string.regexp.charachterclass",
|
||||
"regexp.keyword.operator",
|
||||
"regexp.keyword.operator",
|
||||
"string.regexp.charachterclass",
|
||||
"regexp.keyword.operator",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"invalid",
|
||||
"string.regexp",
|
||||
"regexp.keyword.operator",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"string.regexp",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"constant.language.escape",
|
||||
"invalid",
|
||||
"string.regexp",
|
||||
"text",
|
||||
"identifier"
|
||||
]
|
||||
},
|
||||
{
|
||||
"state": "start",
|
||||
"values": [
|
||||
"a",
|
||||
"=",
|
||||
"/a/",
|
||||
" ",
|
||||
"jk",
|
||||
" ",
|
||||
"=",
|
||||
" ",
|
||||
"/ /",
|
||||
" ",
|
||||
"/",
|
||||
" ",
|
||||
"/ /"
|
||||
],
|
||||
"types": [
|
||||
"identifier",
|
||||
"keyword.operator",
|
||||
"string.regexp",
|
||||
"text",
|
||||
"identifier",
|
||||
"text",
|
||||
"keyword.operator",
|
||||
"text",
|
||||
"string.regexp",
|
||||
"text",
|
||||
"keyword.operator",
|
||||
"text",
|
||||
"string.regexp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"state": "start",
|
||||
"values": [
|
||||
|
|
@ -223,7 +368,8 @@
|
|||
" ",
|
||||
"/u",
|
||||
"\\t",
|
||||
"*/"
|
||||
"*",
|
||||
"/"
|
||||
],
|
||||
"types": [
|
||||
"text",
|
||||
|
|
@ -233,6 +379,7 @@
|
|||
"text",
|
||||
"string.regexp",
|
||||
"regexp.keyword.operator",
|
||||
"constant.language.escape",
|
||||
"string.regexp"
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
"--------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
"--------------------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -290,7 +290,7 @@
|
|||
"-------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
"----------------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -338,7 +338,7 @@
|
|||
{
|
||||
"state": "start",
|
||||
"values": [
|
||||
"Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the Mozilla tri-license (MPL/GPL/LGPL), the same license used by Firefox. This license is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!"
|
||||
"Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!"
|
||||
],
|
||||
"types": [
|
||||
"text"
|
||||
|
|
@ -414,7 +414,7 @@
|
|||
"-------------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1166,7 +1166,7 @@
|
|||
"-------------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1255,7 +1255,7 @@
|
|||
"-----------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1384,7 +1384,7 @@
|
|||
"-----------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1559,7 +1559,7 @@
|
|||
"----------------------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1716,7 +1716,7 @@
|
|||
"------------"
|
||||
],
|
||||
"types": [
|
||||
"markup.heading.1"
|
||||
"markup.heading.2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue