update mode tests
This commit is contained in:
parent
1ad5e66be0
commit
d53c91e41a
7 changed files with 255 additions and 47 deletions
24
lib/ace/mode/_test/text_php.txt
Normal file
24
lib/ace/mode/_test/text_php.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
function nfact($n) {
|
||||
if ($n == 0) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return $n * nfact($n - 1);
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n\nPlease enter a whole number ... ";
|
||||
$num = trim(fgets(STDIN));
|
||||
|
||||
// ===== PROCESS - Determing the factorial of the input number =====
|
||||
$output = "\n\nFactorial " . $num . " = " . nfact($num) . "\n\n";
|
||||
echo $output;
|
||||
|
||||
?> <script> <?php
|
||||
echo '
|
||||
';
|
||||
?>
|
||||
/*this is js <?php echo ':)'; ?>
|
||||
</script> not &js;
|
||||
33
lib/ace/mode/_test/tokens_gitignore.json
Normal file
33
lib/ace/mode/_test/tokens_gitignore.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
[[
|
||||
"start",
|
||||
["comment","# A sample .gitignore file."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text",".buildlog"]
|
||||
],[
|
||||
"start",
|
||||
["text",".DS_Store"]
|
||||
],[
|
||||
"start",
|
||||
["text",".svn"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment","# Negated patterns:"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","!foo.bar"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment","# Also ignore user settings..."]
|
||||
],[
|
||||
"start",
|
||||
["text","/.settings"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -500,4 +500,4 @@
|
|||
["paren.rparen.lsl","}"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
]]
|
||||
|
|
@ -345,4 +345,4 @@
|
|||
["text"," "],
|
||||
["comment","--[[ blah ]]"],
|
||||
["paren.rparen",")"]
|
||||
]]
|
||||
]]
|
||||
|
|
@ -129,6 +129,43 @@
|
|||
],[
|
||||
"php-start"
|
||||
],[
|
||||
"start",
|
||||
["php-start","js-start"],
|
||||
["support.php_tag","?>"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text"," "],
|
||||
["support.php_tag","<?php"]
|
||||
],[
|
||||
["php-qstring","php-start","js-start"],
|
||||
["support.function","echo"],
|
||||
["text"," "],
|
||||
["string","'"]
|
||||
],[
|
||||
["php-start","js-start"],
|
||||
["string","'"],
|
||||
["text",";"]
|
||||
],[
|
||||
"js-start",
|
||||
["support.php_tag","?>"]
|
||||
],[
|
||||
"js-comment_regex_allowed",
|
||||
["comment","/*this is js "],
|
||||
["support.php_tag","<?php"],
|
||||
["text"," "],
|
||||
["support.function","echo"],
|
||||
["text"," "],
|
||||
["string","':)'"],
|
||||
["text","; "],
|
||||
["support.php_tag","?>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," not "],
|
||||
["constant.language.escape.reference.xml","&js;"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
158
lib/ace/mode/_test/tokens_vala.json
Normal file
158
lib/ace/mode/_test/tokens_vala.json
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
[[
|
||||
"start",
|
||||
["meta.using.vala",""],
|
||||
["keyword.other.using.vala","using"],
|
||||
["meta.using.vala"," "],
|
||||
["storage.modifier.using.vala","Gtk"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"text0",
|
||||
["storage.type.primitive.array.vala","int"],
|
||||
["text"," main ("],
|
||||
["storage.type.primitive.array.vala","string"],
|
||||
["text","[] args) {"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "],
|
||||
["storage.type.vala","Gtk"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","init ("],
|
||||
["storage.modifier.vala","ref"],
|
||||
["text"," args)"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "],
|
||||
["storage.type.primitive.vala","var"],
|
||||
["text"," foo "],
|
||||
["keyword.operator.assignment.vala","="],
|
||||
["text"," "],
|
||||
["keyword.control.new.vala","new"],
|
||||
["text"," "],
|
||||
["storage.type.generic.vala","MyFoo<string[](), MyBar<string, int>>"],
|
||||
["text","()"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0"
|
||||
],[
|
||||
"text0",
|
||||
["text"," "],
|
||||
["storage.type.primitive.vala","var"],
|
||||
["text"," window "],
|
||||
["keyword.operator.assignment.vala","="],
|
||||
["text"," "],
|
||||
["keyword.control.new.vala","new"],
|
||||
["text"," "],
|
||||
["storage.type.vala","Window"],
|
||||
["text","()"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","title "],
|
||||
["keyword.operator.assignment.vala","="],
|
||||
["text"," "],
|
||||
["punctuation.definition.string.begin.vala","\""],
|
||||
["string.quoted.double.vala","Hello, World!"],
|
||||
["punctuation.definition.string.end.vala","\""],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","border_width "],
|
||||
["keyword.operator.assignment.vala","="],
|
||||
["text"," "],
|
||||
["constant.numeric.vala","10"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","window_position "],
|
||||
["keyword.operator.assignment.vala","="],
|
||||
["text"," "],
|
||||
["storage.type.vala","WindowPosition"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["constant.other.vala","CENTER"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","set_default_size("],
|
||||
["constant.numeric.vala","350"],
|
||||
["text",", "],
|
||||
["constant.numeric.vala","70"],
|
||||
["text",")"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","destroy"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","connect("],
|
||||
["storage.type.vala","Gtk"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","main_quit)"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "],
|
||||
["storage.type.primitive.vala","var"],
|
||||
["text"," label "],
|
||||
["keyword.operator.assignment.vala","="],
|
||||
["text"," "],
|
||||
["keyword.control.new.vala","new"],
|
||||
["text"," "],
|
||||
["storage.type.vala","Label"],
|
||||
["text","("],
|
||||
["punctuation.definition.string.begin.vala","\""],
|
||||
["string.quoted.double.vala","Hello, World!"],
|
||||
["punctuation.definition.string.end.vala","\""],
|
||||
["text",")"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","add(label)"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," window"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","show_all()"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "],
|
||||
["storage.type.vala","Gtk"],
|
||||
["keyword.operator.dereference.vala","."],
|
||||
["text","main()"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"text0",
|
||||
["text"," "],
|
||||
["keyword.control.vala","return"],
|
||||
["text"," "],
|
||||
["constant.numeric.vala","0"],
|
||||
["punctuation.terminator.vala",";"]
|
||||
],[
|
||||
"start",
|
||||
["text","}"]
|
||||
]]
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
[[
|
||||
"[\"start\"]",
|
||||
["keyword","xquery"],
|
||||
["text"," "],
|
||||
["keyword","version"],
|
||||
["text"," "],
|
||||
["string","\""],
|
||||
["string","1.0"],
|
||||
["string","\""],
|
||||
["text",";"]
|
||||
],[
|
||||
"[\"start\"]"
|
||||
],[
|
||||
"[\"start\"]",
|
||||
["keyword","let"],
|
||||
["text"," "],
|
||||
["variable","$message"],
|
||||
["text"," "],
|
||||
["keyword.operator",":="],
|
||||
["text"," "],
|
||||
["string","\""],
|
||||
["string","Hello World!"],
|
||||
["string","\""]
|
||||
],[
|
||||
"[\"start\",\"StartTag\",\"TagContent\"]",
|
||||
["keyword","return"],
|
||||
["text"," "],
|
||||
["meta.tag","<results"],
|
||||
["meta.tag",">"]
|
||||
],[
|
||||
"[\"start\",\"StartTag\",\"TagContent\"]",
|
||||
["text"," "],
|
||||
["meta.tag","<message"],
|
||||
["meta.tag",">"],
|
||||
["text","{"],
|
||||
["variable","$message"],
|
||||
["text","}"],
|
||||
["meta.tag","</message>"]
|
||||
],[
|
||||
"[\"start\"]",
|
||||
["meta.tag","</results>"]
|
||||
],[
|
||||
"[\"start\"]"
|
||||
]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue