| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/test.js.tar |
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/haml/test.js 0000644 00000005702 15112774753 0033626 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "haml");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Requires at least one media query
MT("elementName",
"[tag %h1] Hey There");
MT("oneElementPerLine",
"[tag %h1] Hey There %h2");
MT("idSelector",
"[tag %h1][attribute #test] Hey There");
MT("classSelector",
"[tag %h1][attribute .hello] Hey There");
MT("docType",
"[tag !!! XML]");
MT("comment",
"[comment / Hello WORLD]");
MT("notComment",
"[tag %h1] This is not a / comment ");
MT("attributes",
"[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}");
MT("htmlCode",
"[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket </][tag h1][tag&bracket >]");
MT("rubyBlock",
"[operator =][variable-2 @item]");
MT("selectorRubyBlock",
"[tag %a.selector=] [variable-2 @item]");
MT("nestedRubyBlock",
"[tag %a]",
" [operator =][variable puts] [string \"test\"]");
MT("multilinePlaintext",
"[tag %p]",
" Hello,",
" World");
MT("multilineRuby",
"[tag %p]",
" [comment -# this is a comment]",
" [comment and this is a comment too]",
" Date/Time",
" [operator -] [variable now] [operator =] [tag DateTime][operator .][property now]",
" [tag %strong=] [variable now]",
" [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])",
" [operator =][string \"Happy\"]",
" [operator =][string \"Belated\"]",
" [operator =][string \"Birthday\"]");
MT("multilineComment",
"[comment /]",
" [comment Multiline]",
" [comment Comment]");
MT("hamlComment",
"[comment -# this is a comment]");
MT("multilineHamlComment",
"[comment -# this is a comment]",
" [comment and this is a comment too]");
MT("multilineHTMLComment",
"[comment <!--]",
" [comment what a comment]",
" [comment -->]");
MT("hamlAfterRubyTag",
"[attribute .block]",
" [tag %strong=] [variable now]",
" [attribute .test]",
" [operator =][variable now]",
" [attribute .right]");
MT("stretchedRuby",
"[operator =] [variable puts] [string \"Hello\"],",
" [string \"World\"]");
MT("interpolationInHashAttribute",
//"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
MT("interpolationInHTMLAttribute",
"[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/slim/test.js 0000644 00000006072 15112774763 0033653 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Slim Highlighting for CodeMirror copyright (c) HicknHack Software Gmbh
(function() {
var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "slim");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Requires at least one media query
MT("elementName",
"[tag h1] Hey There");
MT("oneElementPerLine",
"[tag h1] Hey There .h2");
MT("idShortcut",
"[attribute&def #test] Hey There");
MT("tagWithIdShortcuts",
"[tag h1][attribute&def #test] Hey There");
MT("classShortcut",
"[attribute&qualifier .hello] Hey There");
MT("tagWithIdAndClassShortcuts",
"[tag h1][attribute&def #test][attribute&qualifier .hello] Hey There");
MT("docType",
"[keyword doctype] xml");
MT("comment",
"[comment / Hello WORLD]");
MT("notComment",
"[tag h1] This is not a / comment ");
MT("attributes",
"[tag a]([attribute title]=[string \"test\"]) [attribute href]=[string \"link\"]}");
MT("multiLineAttributes",
"[tag a]([attribute title]=[string \"test\"]",
" ) [attribute href]=[string \"link\"]}");
MT("htmlCode",
"[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket </][tag h1][tag&bracket >]");
MT("rubyBlock",
"[operator&special =][variable-2 @item]");
MT("selectorRubyBlock",
"[tag a][attribute&qualifier .test][operator&special =] [variable-2 @item]");
MT("nestedRubyBlock",
"[tag a]",
" [operator&special =][variable puts] [string \"test\"]");
MT("multilinePlaintext",
"[tag p]",
" | Hello,",
" World");
MT("multilineRuby",
"[tag p]",
" [comment /# this is a comment]",
" [comment and this is a comment too]",
" | Date/Time",
" [operator&special -] [variable now] [operator =] [tag DateTime][operator .][property now]",
" [tag strong][operator&special =] [variable now]",
" [operator&special -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])",
" [operator&special =][string \"Happy\"]",
" [operator&special =][string \"Belated\"]",
" [operator&special =][string \"Birthday\"]");
MT("multilineComment",
"[comment /]",
" [comment Multiline]",
" [comment Comment]");
MT("hamlAfterRubyTag",
"[attribute&qualifier .block]",
" [tag strong][operator&special =] [variable now]",
" [attribute&qualifier .test]",
" [operator&special =][variable now]",
" [attribute&qualifier .right]");
MT("stretchedRuby",
"[operator&special =] [variable puts] [string \"Hello\"],",
" [string \"World\"]");
MT("interpolationInHashAttribute",
"[tag div]{[attribute id] = [string \"]#{[variable test]}[string _]#{[variable ting]}[string \"]} test");
MT("interpolationInHTMLAttribute",
"[tag div]([attribute title]=[string \"]#{[variable test]}[string _]#{[variable ting]()}[string \"]) Test");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/python/test.js 0000644 00000002223 15113036340 0027740 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4},
{name: "python",
version: 3,
singleLineStringErrors: false});
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Error, because "foobarhello" is neither a known type or property, but
// property was expected (after "and"), and it should be in parentheses.
MT("decoratorStartOfLine",
"[meta @dec]",
"[keyword def] [def function]():",
" [keyword pass]");
MT("decoratorIndented",
"[keyword class] [def Foo]:",
" [meta @dec]",
" [keyword def] [def function]():",
" [keyword pass]");
MT("matmulWithSpace:", "[variable a] [operator @] [variable b]");
MT("matmulWithoutSpace:", "[variable a][operator @][variable b]");
MT("matmulSpaceBefore:", "[variable a] [operator @][variable b]");
MT("fValidStringPrefix", "[string f'this is a {formatted} string']");
MT("uValidStringPrefix", "[string u'this is an unicode string']");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/markdown/test.js 0000644 00000071736 15113277573 0034540 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "markdown");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "markdown", highlightFormatting: true});
function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
var modeAtxNoSpace = CodeMirror.getMode({tabSize: 4}, {name: "markdown", allowAtxHeaderWithoutSpace: true});
function AtxNoSpaceTest(name) { test.mode(name, modeAtxNoSpace, Array.prototype.slice.call(arguments, 1)); }
var modeFenced = CodeMirror.getMode({tabSize: 4}, {name: "markdown", fencedCodeBlocks: true});
function FencedTest(name) { test.mode(name, modeFenced, Array.prototype.slice.call(arguments, 1)); }
var modeOverrideClasses = CodeMirror.getMode({tabsize: 4}, {
name: "markdown",
strikethrough: true,
tokenTypeOverrides: {
"header" : "override-header",
"code" : "override-code",
"quote" : "override-quote",
"list1" : "override-list1",
"list2" : "override-list2",
"list3" : "override-list3",
"hr" : "override-hr",
"image" : "override-image",
"imageAltText": "override-image-alt-text",
"imageMarker": "override-image-marker",
"linkInline" : "override-link-inline",
"linkEmail" : "override-link-email",
"linkText" : "override-link-text",
"linkHref" : "override-link-href",
"em" : "override-em",
"strong" : "override-strong",
"strikethrough" : "override-strikethrough"
}});
function TokenTypeOverrideTest(name) { test.mode(name, modeOverrideClasses, Array.prototype.slice.call(arguments, 1)); }
var modeFormattingOverride = CodeMirror.getMode({tabsize: 4}, {
name: "markdown",
highlightFormatting: true,
tokenTypeOverrides: {
"formatting" : "override-formatting"
}});
function FormatTokenTypeOverrideTest(name) { test.mode(name, modeFormattingOverride, Array.prototype.slice.call(arguments, 1)); }
FT("formatting_emAsterisk",
"[em&formatting&formatting-em *][em foo][em&formatting&formatting-em *]");
FT("formatting_emUnderscore",
"[em&formatting&formatting-em _][em foo][em&formatting&formatting-em _]");
FT("formatting_strongAsterisk",
"[strong&formatting&formatting-strong **][strong foo][strong&formatting&formatting-strong **]");
FT("formatting_strongUnderscore",
"[strong&formatting&formatting-strong __][strong foo][strong&formatting&formatting-strong __]");
FT("formatting_codeBackticks",
"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
FT("formatting_doubleBackticks",
"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
FT("formatting_atxHeader",
"[header&header-1&formatting&formatting-header&formatting-header-1 # ][header&header-1 foo # bar ][header&header-1&formatting&formatting-header&formatting-header-1 #]");
FT("formatting_setextHeader",
"foo",
"[header&header-1&formatting&formatting-header&formatting-header-1 =]");
FT("formatting_blockquote",
"[quote"e-1&formatting&formatting-quote&formatting-quote-1 > ][quote"e-1 foo]");
FT("formatting_list",
"[variable-2&formatting&formatting-list&formatting-list-ul - ][variable-2 foo]");
FT("formatting_list",
"[variable-2&formatting&formatting-list&formatting-list-ol 1. ][variable-2 foo]");
FT("formatting_link",
"[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string&url (][string&url http://example.com/][string&formatting&formatting-link-string&url )]");
FT("formatting_linkReference",
"[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string&url [][string&url bar][string&formatting&formatting-link-string&url ]]]",
"[link&formatting&formatting-link [][link bar][link&formatting&formatting-link ]]:] [string&url http://example.com/]");
FT("formatting_linkWeb",
"[link&formatting&formatting-link <][link http://example.com/][link&formatting&formatting-link >]");
FT("formatting_linkEmail",
"[link&formatting&formatting-link <][link user@example.com][link&formatting&formatting-link >]");
FT("formatting_escape",
"[formatting-escape \\*]");
FT("formatting_image",
"[formatting&formatting-image&image&image-marker !][formatting&formatting-image&image&image-alt-text&link [[][image&image-alt-text&link alt text][formatting&formatting-image&image&image-alt-text&link ]]][formatting&formatting-link-string&string&url (][url&string http://link.to/image.jpg][formatting&formatting-link-string&string&url )]");
MT("plainText",
"foo");
// Don't style single trailing space
MT("trailingSpace1",
"foo ");
// Two or more trailing spaces should be styled with line break character
MT("trailingSpace2",
"foo[trailing-space-a ][trailing-space-new-line ]");
MT("trailingSpace3",
"foo[trailing-space-a ][trailing-space-b ][trailing-space-new-line ]");
MT("trailingSpace4",
"foo[trailing-space-a ][trailing-space-b ][trailing-space-a ][trailing-space-new-line ]");
// Code blocks using 4 spaces (regardless of CodeMirror.tabSize value)
MT("codeBlocksUsing4Spaces",
" [comment foo]");
// Code blocks using 4 spaces with internal indentation
MT("codeBlocksUsing4SpacesIndentation",
" [comment bar]",
" [comment hello]",
" [comment world]",
" [comment foo]",
"bar");
// Code blocks should end even after extra indented lines
MT("codeBlocksWithTrailingIndentedLine",
" [comment foo]",
" [comment bar]",
" [comment baz]",
" ",
"hello");
// Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value)
MT("codeBlocksUsing1Tab",
"\t[comment foo]");
// No code blocks directly after paragraph
// http://spec.commonmark.org/0.19/#example-65
MT("noCodeBlocksAfterParagraph",
"Foo",
" Bar");
// Inline code using backticks
MT("inlineCodeUsingBackticks",
"foo [comment `bar`]");
// Block code using single backtick (shouldn't work)
MT("blockCodeSingleBacktick",
"[comment `]",
"[comment foo]",
"[comment `]");
// Unclosed backticks
// Instead of simply marking as CODE, it would be nice to have an
// incomplete flag for CODE, that is styled slightly different.
MT("unclosedBackticks",
"foo [comment `bar]");
// Per documentation: "To include a literal backtick character within a
// code span, you can use multiple backticks as the opening and closing
// delimiters"
MT("doubleBackticks",
"[comment ``foo ` bar``]");
// Tests based on Dingus
// http://daringfireball.net/projects/markdown/dingus
//
// Multiple backticks within an inline code block
MT("consecutiveBackticks",
"[comment `foo```bar`]");
// Multiple backticks within an inline code block with a second code block
MT("consecutiveBackticks",
"[comment `foo```bar`] hello [comment `world`]");
// Unclosed with several different groups of backticks
MT("unclosedBackticks",
"[comment ``foo ``` bar` hello]");
// Closed with several different groups of backticks
MT("closedBackticks",
"[comment ``foo ``` bar` hello``] world");
// atx headers
// http://daringfireball.net/projects/markdown/syntax#header
MT("atxH1",
"[header&header-1 # foo]");
MT("atxH2",
"[header&header-2 ## foo]");
MT("atxH3",
"[header&header-3 ### foo]");
MT("atxH4",
"[header&header-4 #### foo]");
MT("atxH5",
"[header&header-5 ##### foo]");
MT("atxH6",
"[header&header-6 ###### foo]");
// http://spec.commonmark.org/0.19/#example-24
MT("noAtxH7",
"####### foo");
// http://spec.commonmark.org/0.19/#example-25
MT("noAtxH1WithoutSpace",
"#5 bolt");
// CommonMark requires a space after # but most parsers don't
AtxNoSpaceTest("atxNoSpaceAllowed_H1NoSpace",
"[header&header-1 #foo]");
AtxNoSpaceTest("atxNoSpaceAllowed_H4NoSpace",
"[header&header-4 ####foo]");
AtxNoSpaceTest("atxNoSpaceAllowed_H1Space",
"[header&header-1 # foo]");
// Inline styles should be parsed inside headers
MT("atxH1inline",
"[header&header-1 # foo ][header&header-1&em *bar*]");
// Setext headers - H1, H2
// Per documentation, "Any number of underlining =’s or -’s will work."
// http://daringfireball.net/projects/markdown/syntax#header
// Ideally, the text would be marked as `header` as well, but this is
// not really feasible at the moment. So, instead, we're testing against
// what works today, to avoid any regressions.
//
// Check if single underlining = works
MT("setextH1",
"foo",
"[header&header-1 =]");
// Check if 3+ ='s work
MT("setextH1",
"foo",
"[header&header-1 ===]");
// Check if single underlining - works
MT("setextH2",
"foo",
"[header&header-2 -]");
// Check if 3+ -'s work
MT("setextH2",
"foo",
"[header&header-2 ---]");
// http://spec.commonmark.org/0.19/#example-45
MT("setextH2AllowSpaces",
"foo",
" [header&header-2 ---- ]");
// http://spec.commonmark.org/0.19/#example-44
MT("noSetextAfterIndentedCodeBlock",
" [comment foo]",
"[hr ---]");
// http://spec.commonmark.org/0.19/#example-51
MT("noSetextAfterQuote",
"[quote"e-1 > foo]",
"[hr ---]");
MT("noSetextAfterList",
"[variable-2 - foo]",
"[hr ---]");
// Single-line blockquote with trailing space
MT("blockquoteSpace",
"[quote"e-1 > foo]");
// Single-line blockquote
MT("blockquoteNoSpace",
"[quote"e-1 >foo]");
// No blank line before blockquote
MT("blockquoteNoBlankLine",
"foo",
"[quote"e-1 > bar]");
// Nested blockquote
MT("blockquoteSpace",
"[quote"e-1 > foo]",
"[quote"e-1 >][quote"e-2 > foo]",
"[quote"e-1 >][quote"e-2 >][quote"e-3 > foo]");
// Single-line blockquote followed by normal paragraph
MT("blockquoteThenParagraph",
"[quote"e-1 >foo]",
"",
"bar");
// Multi-line blockquote (lazy mode)
MT("multiBlockquoteLazy",
"[quote"e-1 >foo]",
"[quote"e-1 bar]");
// Multi-line blockquote followed by normal paragraph (lazy mode)
MT("multiBlockquoteLazyThenParagraph",
"[quote"e-1 >foo]",
"[quote"e-1 bar]",
"",
"hello");
// Multi-line blockquote (non-lazy mode)
MT("multiBlockquote",
"[quote"e-1 >foo]",
"[quote"e-1 >bar]");
// Multi-line blockquote followed by normal paragraph (non-lazy mode)
MT("multiBlockquoteThenParagraph",
"[quote"e-1 >foo]",
"[quote"e-1 >bar]",
"",
"hello");
// Header with leading space after continued blockquote (#3287, negative indentation)
MT("headerAfterContinuedBlockquote",
"[quote"e-1 > foo]",
"[quote"e-1 bar]",
"",
" [header&header-1 # hello]");
// Check list types
MT("listAsterisk",
"foo",
"bar",
"",
"[variable-2 * foo]",
"[variable-2 * bar]");
MT("listPlus",
"foo",
"bar",
"",
"[variable-2 + foo]",
"[variable-2 + bar]");
MT("listDash",
"foo",
"bar",
"",
"[variable-2 - foo]",
"[variable-2 - bar]");
MT("listNumber",
"foo",
"bar",
"",
"[variable-2 1. foo]",
"[variable-2 2. bar]");
// Lists require a preceding blank line (per Dingus)
MT("listBogus",
"foo",
"1. bar",
"2. hello");
// List after hr
MT("listAfterHr",
"[hr ---]",
"[variable-2 - bar]");
// List after header
MT("listAfterHeader",
"[header&header-1 # foo]",
"[variable-2 - bar]");
// hr after list
MT("hrAfterList",
"[variable-2 - foo]",
"[hr -----]");
// Formatting in lists (*)
MT("listAsteriskFormatting",
"[variable-2 * ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 * ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 * ][variable-2&comment `foo`][variable-2 bar]");
// Formatting in lists (+)
MT("listPlusFormatting",
"[variable-2 + ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 + ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 + ][variable-2&comment `foo`][variable-2 bar]");
// Formatting in lists (-)
MT("listDashFormatting",
"[variable-2 - ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 - ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 - ][variable-2&comment `foo`][variable-2 bar]");
// Formatting in lists (1.)
MT("listNumberFormatting",
"[variable-2 1. ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]");
// Paragraph lists
MT("listParagraph",
"[variable-2 * foo]",
"",
"[variable-2 * bar]");
// Multi-paragraph lists
//
// 4 spaces
MT("listMultiParagraph",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [variable-2 hello]");
// 4 spaces, extra blank lines (should still be list, per Dingus)
MT("listMultiParagraphExtra",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
"",
" [variable-2 hello]");
// 4 spaces, plus 1 space (should still be list, per Dingus)
MT("listMultiParagraphExtraSpace",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [variable-2 hello]",
"",
" [variable-2 world]");
// 1 tab
MT("listTab",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
"\t[variable-2 hello]");
// No indent
MT("listNoIndent",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
"hello");
MT("listCommonMarkIndentationCode",
"[variable-2 * Code blocks also affect]",
" [variable-3 * The next level starts where the contents start.]",
" [variable-3 * Anything less than that will keep the item on the same level.]",
" [variable-3 * Each list item can indent the first level further and further.]",
" [variable-3 * For the most part, this makes sense while writing a list.]",
" [keyword * This means two items with same indentation can be different levels.]",
" [keyword * Each level has an indent requirement that can change between items.]",
" [keyword * A list item that meets this will be part of the next level.]",
" [variable-3 * Otherwise, it will be part of the level where it does meet this.]",
" [variable-2 * World]");
// Blockquote
MT("blockquote",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [variable-2"e"e-1 > hello]");
// Code block
MT("blockquoteCode",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [comment > hello]",
"",
" [variable-2 world]");
// Code block followed by text
MT("blockquoteCodeText",
"[variable-2 * foo]",
"",
" [variable-2 bar]",
"",
" [comment hello]",
"",
" [variable-2 world]");
// Nested list
MT("listAsteriskNested",
"[variable-2 * foo]",
"",
" [variable-3 * bar]");
MT("listPlusNested",
"[variable-2 + foo]",
"",
" [variable-3 + bar]");
MT("listDashNested",
"[variable-2 - foo]",
"",
" [variable-3 - bar]");
MT("listNumberNested",
"[variable-2 1. foo]",
"",
" [variable-3 2. bar]");
MT("listMixed",
"[variable-2 * foo]",
"",
" [variable-3 + bar]",
"",
" [keyword - hello]",
"",
" [variable-2 1. world]");
MT("listBlockquote",
"[variable-2 * foo]",
"",
" [variable-3 + bar]",
"",
" [quote"e-1&variable-3 > hello]");
MT("listCode",
"[variable-2 * foo]",
"",
" [variable-3 + bar]",
"",
" [comment hello]");
// Code with internal indentation
MT("listCodeIndentation",
"[variable-2 * foo]",
"",
" [comment bar]",
" [comment hello]",
" [comment world]",
" [comment foo]",
" [variable-2 bar]");
// List nesting edge cases
MT("listNested",
"[variable-2 * foo]",
"",
" [variable-3 * bar]",
"",
" [variable-3 hello]"
);
MT("listNested",
"[variable-2 * foo]",
"",
" [variable-3 * bar]",
"",
" [keyword * foo]"
);
// Code followed by text
MT("listCodeText",
"[variable-2 * foo]",
"",
" [comment bar]",
"",
"hello");
// Following tests directly from official Markdown documentation
// http://daringfireball.net/projects/markdown/syntax#hr
MT("hrSpace",
"[hr * * *]");
MT("hr",
"[hr ***]");
MT("hrLong",
"[hr *****]");
MT("hrSpaceDash",
"[hr - - -]");
MT("hrDashLong",
"[hr ---------------------------------------]");
//Images
MT("Images",
"[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://link.to/image.jpg)]")
//Images with highlight alt text
MT("imageEm",
"[image&image-marker !][image&image-alt-text&link [[][image-alt-text&em&image&link *alt text*][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]");
MT("imageStrong",
"[image&image-marker !][image&image-alt-text&link [[][image-alt-text&strong&image&link **alt text**][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]");
MT("imageEmStrong",
"[image&image-marker !][image&image-alt-text&link [[][image-alt-text&image&strong&link **][image&image-alt-text&em&strong&link *alt text**][image&image-alt-text&em&link *][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]");
// Inline link with title
MT("linkTitle",
"[link [[foo]]][string&url (http://example.com/ \"bar\")] hello");
// Inline link without title
MT("linkNoTitle",
"[link [[foo]]][string&url (http://example.com/)] bar");
// Inline link with image
MT("linkImage",
"[link [[][link&image&image-marker !][link&image&image-alt-text&link [[alt text]]][string&url (http://link.to/image.jpg)][link ]]][string&url (http://example.com/)] bar");
// Inline link with Em
MT("linkEm",
"[link [[][link&em *foo*][link ]]][string&url (http://example.com/)] bar");
// Inline link with Strong
MT("linkStrong",
"[link [[][link&strong **foo**][link ]]][string&url (http://example.com/)] bar");
// Inline link with EmStrong
MT("linkEmStrong",
"[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url (http://example.com/)] bar");
// Image with title
MT("imageTitle",
"[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://example.com/ \"bar\")] hello");
// Image without title
MT("imageNoTitle",
"[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://example.com/)] bar");
// Image with asterisks
MT("imageAsterisks",
"[image&image-marker !][image&image-alt-text&link [[ ][image&image-alt-text&em&link *alt text*][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)] bar");
// Not a link. Should be normal text due to square brackets being used
// regularly in text, especially in quoted material, and no space is allowed
// between square brackets and parentheses (per Dingus).
MT("notALink",
"[[foo]] (bar)");
// Reference-style links
MT("linkReference",
"[link [[foo]]][string&url [[bar]]] hello");
// Reference-style links with Em
MT("linkReferenceEm",
"[link [[][link&em *foo*][link ]]][string&url [[bar]]] hello");
// Reference-style links with Strong
MT("linkReferenceStrong",
"[link [[][link&strong **foo**][link ]]][string&url [[bar]]] hello");
// Reference-style links with EmStrong
MT("linkReferenceEmStrong",
"[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url [[bar]]] hello");
// Reference-style links with optional space separator (per documentation)
// "You can optionally use a space to separate the sets of brackets"
MT("linkReferenceSpace",
"[link [[foo]]] [string&url [[bar]]] hello");
// Should only allow a single space ("...use *a* space...")
MT("linkReferenceDoubleSpace",
"[[foo]] [[bar]] hello");
// Reference-style links with implicit link name
MT("linkImplicit",
"[link [[foo]]][string&url [[]]] hello");
// @todo It would be nice if, at some point, the document was actually
// checked to see if the referenced link exists
// Link label, for reference-style links (taken from documentation)
MT("labelNoTitle",
"[link [[foo]]:] [string&url http://example.com/]");
MT("labelIndented",
" [link [[foo]]:] [string&url http://example.com/]");
MT("labelSpaceTitle",
"[link [[foo bar]]:] [string&url http://example.com/ \"hello\"]");
MT("labelDoubleTitle",
"[link [[foo bar]]:] [string&url http://example.com/ \"hello\"] \"world\"");
MT("labelTitleDoubleQuotes",
"[link [[foo]]:] [string&url http://example.com/ \"bar\"]");
MT("labelTitleSingleQuotes",
"[link [[foo]]:] [string&url http://example.com/ 'bar']");
MT("labelTitleParentheses",
"[link [[foo]]:] [string&url http://example.com/ (bar)]");
MT("labelTitleInvalid",
"[link [[foo]]:] [string&url http://example.com/] bar");
MT("labelLinkAngleBrackets",
"[link [[foo]]:] [string&url <http://example.com/> \"bar\"]");
MT("labelTitleNextDoubleQuotes",
"[link [[foo]]:] [string&url http://example.com/]",
"[string \"bar\"] hello");
MT("labelTitleNextSingleQuotes",
"[link [[foo]]:] [string&url http://example.com/]",
"[string 'bar'] hello");
MT("labelTitleNextParentheses",
"[link [[foo]]:] [string&url http://example.com/]",
"[string (bar)] hello");
MT("labelTitleNextMixed",
"[link [[foo]]:] [string&url http://example.com/]",
"(bar\" hello");
MT("labelEscape",
"[link [[foo \\]] ]]:] [string&url http://example.com/]");
MT("labelEscapeColon",
"[link [[foo \\]]: bar]]:] [string&url http://example.com/]");
MT("labelEscapeEnd",
"[[foo\\]]: http://example.com/");
MT("linkWeb",
"[link <http://example.com/>] foo");
MT("linkWebDouble",
"[link <http://example.com/>] foo [link <http://example.com/>]");
MT("linkEmail",
"[link <user@example.com>] foo");
MT("linkEmailDouble",
"[link <user@example.com>] foo [link <user@example.com>]");
MT("emAsterisk",
"[em *foo*] bar");
MT("emUnderscore",
"[em _foo_] bar");
MT("emInWordAsterisk",
"foo[em *bar*]hello");
MT("emInWordUnderscore",
"foo[em _bar_]hello");
// Per documentation: "...surround an * or _ with spaces, it’ll be
// treated as a literal asterisk or underscore."
MT("emEscapedBySpaceIn",
"foo [em _bar _ hello_] world");
MT("emEscapedBySpaceOut",
"foo _ bar[em _hello_]world");
MT("emEscapedByNewline",
"foo",
"_ bar[em _hello_]world");
// Unclosed emphasis characters
// Instead of simply marking as EM / STRONG, it would be nice to have an
// incomplete flag for EM and STRONG, that is styled slightly different.
MT("emIncompleteAsterisk",
"foo [em *bar]");
MT("emIncompleteUnderscore",
"foo [em _bar]");
MT("strongAsterisk",
"[strong **foo**] bar");
MT("strongUnderscore",
"[strong __foo__] bar");
MT("emStrongAsterisk",
"[em *foo][em&strong **bar*][strong hello**] world");
MT("emStrongUnderscore",
"[em _foo][em&strong __bar_][strong hello__] world");
// "...same character must be used to open and close an emphasis span.""
MT("emStrongMixed",
"[em _foo][em&strong **bar*hello__ world]");
MT("emStrongMixed",
"[em *foo][em&strong __bar_hello** world]");
MT("linkWithNestedParens",
"[link [[foo]]][string&url (bar(baz))]")
// These characters should be escaped:
// \ backslash
// ` backtick
// * asterisk
// _ underscore
// {} curly braces
// [] square brackets
// () parentheses
// # hash mark
// + plus sign
// - minus sign (hyphen)
// . dot
// ! exclamation mark
MT("escapeBacktick",
"foo \\`bar\\`");
MT("doubleEscapeBacktick",
"foo \\\\[comment `bar\\\\`]");
MT("escapeAsterisk",
"foo \\*bar\\*");
MT("doubleEscapeAsterisk",
"foo \\\\[em *bar\\\\*]");
MT("escapeUnderscore",
"foo \\_bar\\_");
MT("doubleEscapeUnderscore",
"foo \\\\[em _bar\\\\_]");
MT("escapeHash",
"\\# foo");
MT("doubleEscapeHash",
"\\\\# foo");
MT("escapeNewline",
"\\",
"[em *foo*]");
// Class override tests
TokenTypeOverrideTest("overrideHeader1",
"[override-header&override-header-1 # Foo]");
TokenTypeOverrideTest("overrideHeader2",
"[override-header&override-header-2 ## Foo]");
TokenTypeOverrideTest("overrideHeader3",
"[override-header&override-header-3 ### Foo]");
TokenTypeOverrideTest("overrideHeader4",
"[override-header&override-header-4 #### Foo]");
TokenTypeOverrideTest("overrideHeader5",
"[override-header&override-header-5 ##### Foo]");
TokenTypeOverrideTest("overrideHeader6",
"[override-header&override-header-6 ###### Foo]");
TokenTypeOverrideTest("overrideCode",
"[override-code `foo`]");
TokenTypeOverrideTest("overrideCodeBlock",
"[override-code ```]",
"[override-code foo]",
"[override-code ```]");
TokenTypeOverrideTest("overrideQuote",
"[override-quote&override-quote-1 > foo]",
"[override-quote&override-quote-1 > bar]");
TokenTypeOverrideTest("overrideQuoteNested",
"[override-quote&override-quote-1 > foo]",
"[override-quote&override-quote-1 >][override-quote&override-quote-2 > bar]",
"[override-quote&override-quote-1 >][override-quote&override-quote-2 >][override-quote&override-quote-3 > baz]");
TokenTypeOverrideTest("overrideLists",
"[override-list1 - foo]",
"",
" [override-list2 + bar]",
"",
" [override-list3 * baz]",
"",
" [override-list1 1. qux]",
"",
" [override-list2 - quux]");
TokenTypeOverrideTest("overrideHr",
"[override-hr * * *]");
TokenTypeOverrideTest("overrideImage",
"[override-image&override-image-marker !][override-image&override-image-alt-text&link [[alt text]]][override-link-href&url (http://link.to/image.jpg)]");
TokenTypeOverrideTest("overrideLinkText",
"[override-link-text [[foo]]][override-link-href&url (http://example.com)]");
TokenTypeOverrideTest("overrideLinkEmailAndInline",
"[override-link-email <][override-link-inline foo@example.com>]");
TokenTypeOverrideTest("overrideEm",
"[override-em *foo*]");
TokenTypeOverrideTest("overrideStrong",
"[override-strong **foo**]");
TokenTypeOverrideTest("overrideStrikethrough",
"[override-strikethrough ~~foo~~]");
FormatTokenTypeOverrideTest("overrideFormatting",
"[override-formatting-escape \\*]");
// Tests to make sure GFM-specific things aren't getting through
MT("taskList",
"[variable-2 * [ ]] bar]");
MT("noFencedCodeBlocks",
"~~~",
"foo",
"~~~");
FencedTest("fencedCodeBlocks",
"[comment ```]",
"[comment foo]",
"[comment ```]",
"bar");
FencedTest("fencedCodeBlocksMultipleChars",
"[comment `````]",
"[comment foo]",
"[comment ```]",
"[comment foo]",
"[comment `````]",
"bar");
FencedTest("fencedCodeBlocksTildes",
"[comment ~~~]",
"[comment foo]",
"[comment ~~~]",
"bar");
FencedTest("fencedCodeBlocksTildesMultipleChars",
"[comment ~~~~~]",
"[comment ~~~]",
"[comment foo]",
"[comment ~~~~~]",
"bar");
FencedTest("fencedCodeBlocksMultipleChars",
"[comment `````]",
"[comment foo]",
"[comment ```]",
"[comment foo]",
"[comment `````]",
"bar");
FencedTest("fencedCodeBlocksMixed",
"[comment ~~~]",
"[comment ```]",
"[comment foo]",
"[comment ~~~]",
"bar");
// Tests that require XML mode
MT("xmlMode",
"[tag&bracket <][tag div][tag&bracket >]",
"*foo*",
"[tag&bracket <][tag http://github.com][tag&bracket />]",
"[tag&bracket </][tag div][tag&bracket >]",
"[link <http://github.com/>]");
MT("xmlModeWithMarkdownInside",
"[tag&bracket <][tag div] [attribute markdown]=[string 1][tag&bracket >]",
"[em *foo*]",
"[link <http://github.com/>]",
"[tag </div>]",
"[link <http://github.com/>]",
"[tag&bracket <][tag div][tag&bracket >]",
"[tag&bracket </][tag div][tag&bracket >]");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/shell/test.js 0000644 00000003354 15113516057 0034005 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({}, "shell");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("var",
"text [def $var] text");
MT("varBraces",
"text[def ${var}]text");
MT("varVar",
"text [def $a$b] text");
MT("varBracesVarBraces",
"text[def ${a}${b}]text");
MT("singleQuotedVar",
"[string 'text $var text']");
MT("singleQuotedVarBraces",
"[string 'text ${var} text']");
MT("doubleQuotedVar",
'[string "text ][def $var][string text"]');
MT("doubleQuotedVarBraces",
'[string "text][def ${var}][string text"]');
MT("doubleQuotedVarPunct",
'[string "text ][def $@][string text"]');
MT("doubleQuotedVarVar",
'[string "][def $a$b][string "]');
MT("doubleQuotedVarBracesVarBraces",
'[string "][def ${a}${b}][string "]');
MT("notAString",
"text\\'text");
MT("escapes",
"outside\\'\\\"\\`\\\\[string \"inside\\`\\'\\\"\\\\`\\$notAVar\"]outside\\$\\(notASubShell\\)");
MT("subshell",
"[builtin echo] [quote $(whoami)] s log, stardate [quote `date`].");
MT("doubleQuotedSubshell",
"[builtin echo] [string \"][quote $(whoami)][string 's log, stardate `date`.\"]");
MT("hashbang",
"[meta #!/bin/bash]");
MT("comment",
"text [comment # Blurb]");
MT("numbers",
"[number 0] [number 1] [number 2]");
MT("keywords",
"[keyword while] [atom true]; [keyword do]",
" [builtin sleep] [number 3]",
"[keyword done]");
MT("options",
"[builtin ls] [attribute -l] [attribute --human-readable]");
MT("operator",
"[def var][operator =]value");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/dylan/test.js 0000644 00000005262 15113545025 0034002 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "dylan");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('comments',
'[comment // This is a line comment]',
'[comment /* This is a block comment */]',
'[comment /* This is a multi]',
'[comment line comment]',
'[comment */]',
'[comment /* And this is a /*]',
'[comment /* nested */ comment */]');
MT('unary_operators',
'[operator -][variable a]',
'[operator -] [variable a]',
'[operator ~][variable a]',
'[operator ~] [variable a]');
MT('binary_operators',
'[variable a] [operator +] [variable b]',
'[variable a] [operator -] [variable b]',
'[variable a] [operator *] [variable b]',
'[variable a] [operator /] [variable b]',
'[variable a] [operator ^] [variable b]',
'[variable a] [operator =] [variable b]',
'[variable a] [operator ==] [variable b]',
'[variable a] [operator ~=] [variable b]',
'[variable a] [operator ~==] [variable b]',
'[variable a] [operator <] [variable b]',
'[variable a] [operator <=] [variable b]',
'[variable a] [operator >] [variable b]',
'[variable a] [operator >=] [variable b]',
'[variable a] [operator &] [variable b]',
'[variable a] [operator |] [variable b]',
'[variable a] [operator :=] [variable b]');
MT('integers',
'[number 1]',
'[number 123]',
'[number -123]',
'[number +456]',
'[number #b010]',
'[number #o073]',
'[number #xabcDEF123]');
MT('floats',
'[number .3]',
'[number -1.]',
'[number -2.335]',
'[number +3.78d1]',
'[number 3.78s-1]',
'[number -3.32e+5]');
MT('characters_and_strings',
"[string 'a']",
"[string '\\\\'']",
'[string ""]',
'[string "a"]',
'[string "abc def"]',
'[string "More escaped characters: \\\\\\\\ \\\\a \\\\b \\\\e \\\\f \\\\n \\\\r \\\\t \\\\0 ..."]');
MT('brackets',
'[bracket #[[]]]',
'[bracket #()]',
'[bracket #(][number 1][bracket )]',
'[bracket [[][number 1][punctuation ,] [number 3][bracket ]]]',
'[bracket ()]',
'[bracket {}]',
'[keyword if] [bracket (][variable foo][bracket )]',
'[bracket (][number 1][bracket )]',
'[bracket [[][number 1][bracket ]]]');
MT('hash_words',
'[punctuation ##]',
'[atom #f]', '[atom #F]',
'[atom #t]', '[atom #T]',
'[atom #all-keys]',
'[atom #include]',
'[atom #key]',
'[atom #next]',
'[atom #rest]',
'[string #"foo"]',
'[error #invalid]');
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/php/test.js 0000644 00000014767 15114016406 0027230 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "php");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('simple_test',
'[meta <?php] ' +
'[keyword echo] [string "aaa"]; ' +
'[meta ?>]');
MT('variable_interpolation_non_alphanumeric',
'[meta <?php]',
'[keyword echo] [string "aaa$~$!$@$#$$$%$^$&$*jQuery($)jQuery.$<$>$/$\\$}$\\\"$:$;$?$|$[[$]]$+$=aaa"]',
'[meta ?>]');
MT('variable_interpolation_digits',
'[meta <?php]',
'[keyword echo] [string "aaa$1$2$3$4$5$6$7$8$9$0aaa"]',
'[meta ?>]');
MT('variable_interpolation_simple_syntax_1',
'[meta <?php]',
'[keyword echo] [string "aaa][variable-2 $aaa][string .aaa"];',
'[meta ?>]');
MT('variable_interpolation_simple_syntax_2',
'[meta <?php]',
'[keyword echo] [string "][variable-2 $aaaa][[','[number 2]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[number 2345]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[number 2.3]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[variable aaaaa]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa"];',
'[keyword echo] [string "1aaa][variable-2 $aaaa][[','[number 2]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[number 2345]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[number 2.3]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[variable aaaaa]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa"];',
'[meta ?>]');
MT('variable_interpolation_simple_syntax_3',
'[meta <?php]',
'[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string .aaaaaa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa"];',
'[meta ?>]');
MT('variable_interpolation_escaping',
'[meta <?php] [comment /* Escaping */]',
'[keyword echo] [string "aaa\\$aaaa->aaa.aaa"];',
'[keyword echo] [string "aaa\\$aaaa[[2]]aaa.aaa"];',
'[keyword echo] [string "aaa\\$aaaa[[asd]]aaa.aaa"];',
'[keyword echo] [string "aaa{\\$aaaa->aaa.aaa"];',
'[keyword echo] [string "aaa{\\$aaaa[[2]]aaa.aaa"];',
'[keyword echo] [string "aaa{\\aaaaa[[asd]]aaa.aaa"];',
'[keyword echo] [string "aaa\\${aaaa->aaa.aaa"];',
'[keyword echo] [string "aaa\\${aaaa[[2]]aaa.aaa"];',
'[keyword echo] [string "aaa\\${aaaa[[asd]]aaa.aaa"];',
'[meta ?>]');
MT('variable_interpolation_complex_syntax_1',
'[meta <?php]',
'[keyword echo] [string "aaa][variable-2 $]{[variable aaaa]}[string ->aaa.aaa"];',
'[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa"];',
'[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa][[',' [number 42]',']]}[string ->aaa.aaa"];',
'[keyword echo] [string "aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa');
MT('variable_interpolation_complex_syntax_2',
'[meta <?php] [comment /* Monsters */]',
'[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>} $aaa<?php } */]}[string ->aaa.aaa"];',
'[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>*/][[',' [string "aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string "]',']]}[string ->aaa.aaa"];',
'[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa"];');
function build_recursive_monsters(nt, t, n){
var monsters = [t];
for (var i = 1; i <= n; ++i)
monsters[i] = nt.join(monsters[i - 1]);
return monsters;
}
var m1 = build_recursive_monsters(
['[string "][variable-2 $]{[variable aaa] [operator +] ', '}[string "]'],
'[comment /* }?>} */] [string "aaa][variable-2 $aaa][string .aaa"]',
10
);
MT('variable_interpolation_complex_syntax_3_1',
'[meta <?php] [comment /* Recursive monsters */]',
'[keyword echo] ' + m1[4] + ';',
'[keyword echo] ' + m1[7] + ';',
'[keyword echo] ' + m1[8] + ';',
'[keyword echo] ' + m1[5] + ';',
'[keyword echo] ' + m1[1] + ';',
'[keyword echo] ' + m1[6] + ';',
'[keyword echo] ' + m1[9] + ';',
'[keyword echo] ' + m1[0] + ';',
'[keyword echo] ' + m1[10] + ';',
'[keyword echo] ' + m1[2] + ';',
'[keyword echo] ' + m1[3] + ';',
'[keyword echo] [string "end"];',
'[meta ?>]');
var m2 = build_recursive_monsters(
['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a"]'],
'[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
5
);
MT('variable_interpolation_complex_syntax_3_2',
'[meta <?php] [comment /* Recursive monsters 2 */]',
'[keyword echo] ' + m2[0] + ';',
'[keyword echo] ' + m2[1] + ';',
'[keyword echo] ' + m2[5] + ';',
'[keyword echo] ' + m2[4] + ';',
'[keyword echo] ' + m2[2] + ';',
'[keyword echo] ' + m2[3] + ';',
'[keyword echo] [string "end"];',
'[meta ?>]');
function build_recursive_monsters_2(mf1, mf2, nt, t, n){
var monsters = [t];
for (var i = 1; i <= n; ++i)
monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3];
return monsters;
}
var m3 = build_recursive_monsters_2(
m1,
m2,
['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a"]'],
'[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
4
);
MT('variable_interpolation_complex_syntax_3_3',
'[meta <?php] [comment /* Recursive monsters 2 */]',
'[keyword echo] ' + m3[4] + ';',
'[keyword echo] ' + m3[0] + ';',
'[keyword echo] ' + m3[3] + ';',
'[keyword echo] ' + m3[1] + ';',
'[keyword echo] ' + m3[2] + ';',
'[keyword echo] [string "end"];',
'[meta ?>]');
MT("variable_interpolation_heredoc",
"[meta <?php]",
"[string <<<here]",
"[string doc ][variable-2 $]{[variable yay]}[string more]",
"[string here]; [comment // normal]");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/gfm/test.js 0000644 00000016624 15114174411 0033446 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "gfm");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "gfm", highlightFormatting: true});
function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
FT("codeBackticks",
"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
FT("doubleBackticks",
"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
FT("codeBlock",
"[comment&formatting&formatting-code-block ```css]",
"[tag foo]",
"[comment&formatting&formatting-code-block ```]");
FT("taskList",
"[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2 foo]",
"[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2 foo]");
FT("formatting_strikethrough",
"[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]");
FT("formatting_strikethrough",
"foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]");
MT("emInWordAsterisk",
"foo[em *bar*]hello");
MT("emInWordUnderscore",
"foo_bar_hello");
MT("emStrongUnderscore",
"[strong __][em&strong _foo__][em _] bar");
MT("fencedCodeBlocks",
"[comment ```]",
"[comment foo]",
"",
"[comment ```]",
"bar");
MT("fencedCodeBlockModeSwitching",
"[comment ```javascript]",
"[variable foo]",
"",
"[comment ```]",
"bar");
MT("fencedCodeBlockModeSwitchingObjc",
"[comment ```objective-c]",
"[keyword @property] [variable NSString] [operator *] [variable foo];",
"[comment ```]",
"bar");
MT("fencedCodeBlocksNoTildes",
"~~~",
"foo",
"~~~");
MT("taskListAsterisk",
"[variable-2 * []] foo]", // Invalid; must have space or x between []
"[variable-2 * [ ]]bar]", // Invalid; must have space after ]
"[variable-2 * [x]]hello]", // Invalid; must have space after ]
"[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("taskListPlus",
"[variable-2 + []] foo]", // Invalid; must have space or x between []
"[variable-2 + [ ]]bar]", // Invalid; must have space after ]
"[variable-2 + [x]]hello]", // Invalid; must have space after ]
"[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("taskListDash",
"[variable-2 - []] foo]", // Invalid; must have space or x between []
"[variable-2 - [ ]]bar]", // Invalid; must have space after ]
"[variable-2 - [x]]hello]", // Invalid; must have space after ]
"[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("taskListNumber",
"[variable-2 1. []] foo]", // Invalid; must have space or x between []
"[variable-2 2. [ ]]bar]", // Invalid; must have space after ]
"[variable-2 3. [x]]hello]", // Invalid; must have space after ]
"[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("SHA",
"foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar");
MT("SHAEmphasis",
"[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
MT("shortSHA",
"foo [link be6a8cc] bar");
MT("tooShortSHA",
"foo be6a8c bar");
MT("longSHA",
"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar");
MT("badSHA",
"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar");
MT("userSHA",
"foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello");
MT("userSHAEmphasis",
"[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
MT("userProjectSHA",
"foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world");
MT("userProjectSHAEmphasis",
"[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
MT("num",
"foo [link #1] bar");
MT("numEmphasis",
"[em *foo ][em&link #1][em *]");
MT("badNum",
"foo #1bar hello");
MT("userNum",
"foo [link bar#1] hello");
MT("userNumEmphasis",
"[em *foo ][em&link bar#1][em *]");
MT("userProjectNum",
"foo [link bar/hello#1] world");
MT("userProjectNumEmphasis",
"[em *foo ][em&link bar/hello#1][em *]");
MT("vanillaLink",
"foo [link http://www.example.com/] bar");
MT("vanillaLinkNoScheme",
"foo [link www.example.com] bar");
MT("vanillaLinkHttps",
"foo [link https://www.example.com/] bar");
MT("vanillaLinkDataSchema",
"foo [link data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==] bar");
MT("vanillaLinkPunctuation",
"foo [link http://www.example.com/]. bar");
MT("vanillaLinkExtension",
"foo [link http://www.example.com/index.html] bar");
MT("vanillaLinkEmphasis",
"foo [em *][em&link http://www.example.com/index.html][em *] bar");
MT("notALink",
"foo asfd:asdf bar");
MT("notALink",
"[comment ```css]",
"[tag foo] {[property color]:[keyword black];}",
"[comment ```][link http://www.example.com/]");
MT("notALink",
"[comment ``foo `bar` http://www.example.com/``] hello");
MT("notALink",
"[comment `foo]",
"[comment&link http://www.example.com/]",
"[comment `] foo",
"",
"[link http://www.example.com/]");
MT("headerCodeBlockGithub",
"[header&header-1 # heading]",
"",
"[comment ```]",
"[comment code]",
"[comment ```]",
"",
"Commit: [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2]",
"Issue: [link #1]",
"Link: [link http://www.example.com/]");
MT("strikethrough",
"[strikethrough ~~foo~~]");
MT("strikethroughWithStartingSpace",
"~~ foo~~");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo~~~]");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo ~~]");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo ~~ bar]");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo ~~ bar~~]hello");
MT("strikethroughOneLetter",
"[strikethrough ~~a~~]");
MT("strikethroughWrapped",
"[strikethrough ~~foo]",
"[strikethrough foo~~]");
MT("strikethroughParagraph",
"[strikethrough ~~foo]",
"",
"foo[strikethrough ~~bar]");
MT("strikethroughEm",
"[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]");
MT("strikethroughEm",
"[em *][em&strikethrough ~~foo~~][em *]");
MT("strikethroughStrong",
"[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]");
MT("strikethroughStrong",
"[strong **][strong&strikethrough ~~foo~~][strong **]");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/clike/test.js 0000644 00000003617 15114175551 0033770 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-c");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("indent",
"[variable-3 void] [def foo]([variable-3 void*] [variable a], [variable-3 int] [variable b]) {",
" [variable-3 int] [variable c] [operator =] [variable b] [operator +]",
" [number 1];",
" [keyword return] [operator *][variable a];",
"}");
MT("indent_switch",
"[keyword switch] ([variable x]) {",
" [keyword case] [number 10]:",
" [keyword return] [number 20];",
" [keyword default]:",
" [variable printf]([string \"foo %c\"], [variable x]);",
"}");
MT("def",
"[variable-3 void] [def foo]() {}",
"[keyword struct] [def bar]{}",
"[variable-3 int] [variable-3 *][def baz]() {}");
MT("def_new_line",
"::[variable std]::[variable SomeTerribleType][operator <][variable T][operator >]",
"[def SomeLongMethodNameThatDoesntFitIntoOneLine]([keyword const] [variable MyType][operator &] [variable param]) {}")
MT("double_block",
"[keyword for] (;;)",
" [keyword for] (;;)",
" [variable x][operator ++];",
"[keyword return];");
MT("preprocessor",
"[meta #define FOO 3]",
"[variable-3 int] [variable foo];",
"[meta #define BAR\\]",
"[meta 4]",
"[variable-3 unsigned] [variable-3 int] [variable bar] [operator =] [number 8];",
"[meta #include <baz> ][comment // comment]")
var mode_cpp = CodeMirror.getMode({indentUnit: 2}, "text/x-c++src");
function MTCPP(name) { test.mode(name, mode_cpp, Array.prototype.slice.call(arguments, 1)); }
MTCPP("cpp14_literal",
"[number 10'000];",
"[number 0b10'000];",
"[number 0x10'000];",
"[string '100000'];");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/textile/test.js 0000644 00000022335 15114176663 0034362 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, 'textile');
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('simpleParagraphs',
'Some text.',
'',
'Some more text.');
/*
* Phrase Modifiers
*/
MT('em',
'foo [em _bar_]');
MT('emBoogus',
'code_mirror');
MT('strong',
'foo [strong *bar*]');
MT('strongBogus',
'3 * 3 = 9');
MT('italic',
'foo [em __bar__]');
MT('italicBogus',
'code__mirror');
MT('bold',
'foo [strong **bar**]');
MT('boldBogus',
'3 ** 3 = 27');
MT('simpleLink',
'[link "CodeMirror":http://codemirror.net]');
MT('referenceLink',
'[link "CodeMirror":code_mirror]',
'Normal Text.',
'[link [[code_mirror]]http://codemirror.net]');
MT('footCite',
'foo bar[qualifier [[1]]]');
MT('footCiteBogus',
'foo bar[[1a2]]');
MT('special-characters',
'Registered [tag (r)], ' +
'Trademark [tag (tm)], and ' +
'Copyright [tag (c)] 2008');
MT('cite',
"A book is [keyword ??The Count of Monte Cristo??] by Dumas.");
MT('additionAndDeletion',
'The news networks declared [negative -Al Gore-] ' +
'[positive +George W. Bush+] the winner in Florida.');
MT('subAndSup',
'f(x, n) = log [builtin ~4~] x [builtin ^n^]');
MT('spanAndCode',
'A [quote %span element%] and [atom @code element@]');
MT('spanBogus',
'Percentage 25% is not a span.');
MT('citeBogus',
'Question? is not a citation.');
MT('codeBogus',
'user@example.com');
MT('subBogus',
'~username');
MT('supBogus',
'foo ^ bar');
MT('deletionBogus',
'3 - 3 = 0');
MT('additionBogus',
'3 + 3 = 6');
MT('image',
'An image: [string !http://www.example.com/image.png!]');
MT('imageWithAltText',
'An image: [string !http://www.example.com/image.png (Alt Text)!]');
MT('imageWithUrl',
'An image: [string !http://www.example.com/image.png!:http://www.example.com/]');
/*
* Headers
*/
MT('h1',
'[header&header-1 h1. foo]');
MT('h2',
'[header&header-2 h2. foo]');
MT('h3',
'[header&header-3 h3. foo]');
MT('h4',
'[header&header-4 h4. foo]');
MT('h5',
'[header&header-5 h5. foo]');
MT('h6',
'[header&header-6 h6. foo]');
MT('h7Bogus',
'h7. foo');
MT('multipleHeaders',
'[header&header-1 h1. Heading 1]',
'',
'Some text.',
'',
'[header&header-2 h2. Heading 2]',
'',
'More text.');
MT('h1inline',
'[header&header-1 h1. foo ][header&header-1&em _bar_][header&header-1 baz]');
/*
* Lists
*/
MT('ul',
'foo',
'bar',
'',
'[variable-2 * foo]',
'[variable-2 * bar]');
MT('ulNoBlank',
'foo',
'bar',
'[variable-2 * foo]',
'[variable-2 * bar]');
MT('ol',
'foo',
'bar',
'',
'[variable-2 # foo]',
'[variable-2 # bar]');
MT('olNoBlank',
'foo',
'bar',
'[variable-2 # foo]',
'[variable-2 # bar]');
MT('ulFormatting',
'[variable-2 * ][variable-2&em _foo_][variable-2 bar]',
'[variable-2 * ][variable-2&strong *][variable-2&em&strong _foo_]' +
'[variable-2&strong *][variable-2 bar]',
'[variable-2 * ][variable-2&strong *foo*][variable-2 bar]');
MT('olFormatting',
'[variable-2 # ][variable-2&em _foo_][variable-2 bar]',
'[variable-2 # ][variable-2&strong *][variable-2&em&strong _foo_]' +
'[variable-2&strong *][variable-2 bar]',
'[variable-2 # ][variable-2&strong *foo*][variable-2 bar]');
MT('ulNested',
'[variable-2 * foo]',
'[variable-3 ** bar]',
'[keyword *** bar]',
'[variable-2 **** bar]',
'[variable-3 ** bar]');
MT('olNested',
'[variable-2 # foo]',
'[variable-3 ## bar]',
'[keyword ### bar]',
'[variable-2 #### bar]',
'[variable-3 ## bar]');
MT('ulNestedWithOl',
'[variable-2 * foo]',
'[variable-3 ## bar]',
'[keyword *** bar]',
'[variable-2 #### bar]',
'[variable-3 ** bar]');
MT('olNestedWithUl',
'[variable-2 # foo]',
'[variable-3 ** bar]',
'[keyword ### bar]',
'[variable-2 **** bar]',
'[variable-3 ## bar]');
MT('definitionList',
'[number - coffee := Hot ][number&em _and_][number black]',
'',
'Normal text.');
MT('definitionListSpan',
'[number - coffee :=]',
'',
'[number Hot ][number&em _and_][number black =:]',
'',
'Normal text.');
MT('boo',
'[number - dog := woof woof]',
'[number - cat := meow meow]',
'[number - whale :=]',
'[number Whale noises.]',
'',
'[number Also, ][number&em _splashing_][number . =:]');
/*
* Attributes
*/
MT('divWithAttribute',
'[punctuation div][punctuation&attribute (#my-id)][punctuation . foo bar]');
MT('divWithAttributeAnd2emRightPadding',
'[punctuation div][punctuation&attribute (#my-id)((][punctuation . foo bar]');
MT('divWithClassAndId',
'[punctuation div][punctuation&attribute (my-class#my-id)][punctuation . foo bar]');
MT('paragraphWithCss',
'p[attribute {color:red;}]. foo bar');
MT('paragraphNestedStyles',
'p. [strong *foo ][strong&em _bar_][strong *]');
MT('paragraphWithLanguage',
'p[attribute [[fr]]]. Parlez-vous français?');
MT('paragraphLeftAlign',
'p[attribute <]. Left');
MT('paragraphRightAlign',
'p[attribute >]. Right');
MT('paragraphRightAlign',
'p[attribute =]. Center');
MT('paragraphJustified',
'p[attribute <>]. Justified');
MT('paragraphWithLeftIndent1em',
'p[attribute (]. Left');
MT('paragraphWithRightIndent1em',
'p[attribute )]. Right');
MT('paragraphWithLeftIndent2em',
'p[attribute ((]. Left');
MT('paragraphWithRightIndent2em',
'p[attribute ))]. Right');
MT('paragraphWithLeftIndent3emRightIndent2em',
'p[attribute ((())]. Right');
MT('divFormatting',
'[punctuation div. ][punctuation&strong *foo ]' +
'[punctuation&strong&em _bar_][punctuation&strong *]');
MT('phraseModifierAttributes',
'p[attribute (my-class)]. This is a paragraph that has a class and' +
' this [em _][em&attribute (#special-phrase)][em emphasized phrase_]' +
' has an id.');
MT('linkWithClass',
'[link "(my-class). This is a link with class":http://redcloth.org]');
/*
* Layouts
*/
MT('paragraphLayouts',
'p. This is one paragraph.',
'',
'p. This is another.');
MT('div',
'[punctuation div. foo bar]');
MT('pre',
'[operator pre. Text]');
MT('bq.',
'[bracket bq. foo bar]',
'',
'Normal text.');
MT('footnote',
'[variable fn123. foo ][variable&strong *bar*]');
/*
* Spanning Layouts
*/
MT('bq..ThenParagraph',
'[bracket bq.. foo bar]',
'',
'[bracket More quote.]',
'p. Normal Text');
MT('bq..ThenH1',
'[bracket bq.. foo bar]',
'',
'[bracket More quote.]',
'[header&header-1 h1. Header Text]');
MT('bc..ThenParagraph',
'[atom bc.. # Some ruby code]',
'[atom obj = {foo: :bar}]',
'[atom puts obj]',
'',
'[atom obj[[:love]] = "*love*"]',
'[atom puts obj.love.upcase]',
'',
'p. Normal text.');
MT('fn1..ThenParagraph',
'[variable fn1.. foo bar]',
'',
'[variable More.]',
'p. Normal Text');
MT('pre..ThenParagraph',
'[operator pre.. foo bar]',
'',
'[operator More.]',
'p. Normal Text');
/*
* Tables
*/
MT('table',
'[variable-3&operator |_. name |_. age|]',
'[variable-3 |][variable-3&strong *Walter*][variable-3 | 5 |]',
'[variable-3 |Florence| 6 |]',
'',
'p. Normal text.');
MT('tableWithAttributes',
'[variable-3&operator |_. name |_. age|]',
'[variable-3 |][variable-3&attribute /2.][variable-3 Jim |]',
'[variable-3 |][variable-3&attribute \\2{color: red}.][variable-3 Sam |]');
/*
* HTML
*/
MT('html',
'[comment <div id="wrapper">]',
'[comment <section id="introduction">]',
'',
'[header&header-1 h1. Welcome]',
'',
'[variable-2 * Item one]',
'[variable-2 * Item two]',
'',
'[comment <a href="http://example.com">Example</a>]',
'',
'[comment </section>]',
'[comment </div>]');
MT('inlineHtml',
'I can use HTML directly in my [comment <span class="youbetcha">Textile</span>].');
/*
* No-Textile
*/
MT('notextile',
'[string-2 notextile. *No* formatting]');
MT('notextileInline',
'Use [string-2 ==*asterisks*==] for [strong *strong*] text.');
MT('notextileWithPre',
'[operator pre. *No* formatting]');
MT('notextileWithSpanningPre',
'[operator pre.. *No* formatting]',
'',
'[operator *No* formatting]');
/* Only toggling phrases between non-word chars. */
MT('phrase-in-word',
'foo_bar_baz');
MT('phrase-non-word',
'[negative -x-] aaa-bbb ccc-ddd [negative -eee-] fff [negative -ggg-]');
MT('phrase-lone-dash',
'foo - bar - baz');
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/ruby/test.js 0000644 00000000726 15114222045 0033647 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "ruby");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("divide_equal_operator",
"[variable bar] [operator /=] [variable foo]");
MT("divide_equal_operator_no_spacing",
"[variable foo][operator /=][number 42]");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/jsx/test.js 0000644 00000005626 15114232460 0033500 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "jsx")
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)) }
MT("selfclose",
"[keyword var] [def x] [operator =] [bracket&tag <] [tag foo] [bracket&tag />] [operator +] [number 1];")
MT("openclose",
"([bracket&tag <][tag foo][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("attr",
"([bracket&tag <][tag foo] [attribute abc]=[string 'value'][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("braced_attr",
"([bracket&tag <][tag foo] [attribute abc]={[number 10]}[bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("braced_text",
"([bracket&tag <][tag foo][bracket&tag >]hello {[number 10]} [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("nested_tag",
"([bracket&tag <][tag foo][bracket&tag ><][tag bar][bracket&tag ></][tag bar][bracket&tag ></][tag foo][bracket&tag >][operator ++])")
MT("nested_jsx",
"[keyword return] (",
" [bracket&tag <][tag foo][bracket&tag >]",
" say {[number 1] [operator +] [bracket&tag <][tag bar] [attribute attr]={[number 10]}[bracket&tag />]}!",
" [bracket&tag </][tag foo][bracket&tag >][operator ++]",
")")
MT("preserve_js_context",
"[variable x] [operator =] [string-2 `quasi${][bracket&tag <][tag foo][bracket&tag />][string-2 }quoted`]")
MT("line_comment",
"([bracket&tag <][tag foo] [comment // hello]",
" [bracket&tag ></][tag foo][bracket&tag >][operator ++])")
MT("line_comment_not_in_tag",
"([bracket&tag <][tag foo][bracket&tag >] // hello",
" [bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("block_comment",
"([bracket&tag <][tag foo] [comment /* hello]",
"[comment line 2]",
"[comment line 3 */] [bracket&tag ></][tag foo][bracket&tag >][operator ++])")
MT("block_comment_not_in_tag",
"([bracket&tag <][tag foo][bracket&tag >]/* hello",
" line 2",
" line 3 */ [bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("missing_attr",
"([bracket&tag <][tag foo] [attribute selected][bracket&tag />][operator ++])")
MT("indent_js",
"([bracket&tag <][tag foo][bracket&tag >]",
" [bracket&tag <][tag bar] [attribute baz]={[keyword function]() {",
" [keyword return] [number 10]",
" }}[bracket&tag />]",
" [bracket&tag </][tag foo][bracket&tag >])")
MT("spread",
"([bracket&tag <][tag foo] [attribute bar]={[meta ...][variable baz] [operator /][number 2]}[bracket&tag />])")
MT("tag_attribute",
"([bracket&tag <][tag foo] [attribute bar]=[bracket&tag <][tag foo][bracket&tag />/>][operator ++])")
})()
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/rust/test.js 0000644 00000001740 15114240413 0033657 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4}, "rust");
function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));}
MT('integer_test',
'[number 123i32]',
'[number 123u32]',
'[number 123_u32]',
'[number 0xff_u8]',
'[number 0o70_i16]',
'[number 0b1111_1111_1001_0000_i32]',
'[number 0usize]');
MT('float_test',
'[number 123.0f64]',
'[number 0.1f64]',
'[number 0.1f32]',
'[number 12E+99_f64]');
MT('string-literals-test',
'[string "foo"]',
'[string r"foo"]',
'[string "\\"foo\\""]',
'[string r#""foo""#]',
'[string "foo #\\"# bar"]',
'[string b"foo"]',
'[string br"foo"]',
'[string b"\\"foo\\""]',
'[string br#""foo""#]',
'[string br##"foo #" bar"##]',
"[string-2 'h']",
"[string-2 b'h']");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/php/test.js 0000644 00000014755 15114244066 0033473 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "php");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('simple_test',
'[meta <?php] ' +
'[keyword echo] [string "aaa"]; ' +
'[meta ?>]');
MT('variable_interpolation_non_alphanumeric',
'[meta <?php]',
'[keyword echo] [string "aaa$~$!$@$#$$$%$^$&$*$($)$.$<$>$/$\\$}$\\\"$:$;$?$|$[[$]]$+$=aaa"]',
'[meta ?>]');
MT('variable_interpolation_digits',
'[meta <?php]',
'[keyword echo] [string "aaa$1$2$3$4$5$6$7$8$9$0aaa"]',
'[meta ?>]');
MT('variable_interpolation_simple_syntax_1',
'[meta <?php]',
'[keyword echo] [string "aaa][variable-2 $aaa][string .aaa"];',
'[meta ?>]');
MT('variable_interpolation_simple_syntax_2',
'[meta <?php]',
'[keyword echo] [string "][variable-2 $aaaa][[','[number 2]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[number 2345]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[number 2.3]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[variable aaaaa]', ']][string aa"];',
'[keyword echo] [string "][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa"];',
'[keyword echo] [string "1aaa][variable-2 $aaaa][[','[number 2]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[number 2345]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[number 2.3]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[variable aaaaa]', ']][string aa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][[','[variable-2 $aaaaa]',']][string aa"];',
'[meta ?>]');
MT('variable_interpolation_simple_syntax_3',
'[meta <?php]',
'[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string .aaaaaa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa"];',
'[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa"];',
'[meta ?>]');
MT('variable_interpolation_escaping',
'[meta <?php] [comment /* Escaping */]',
'[keyword echo] [string "aaa\\$aaaa->aaa.aaa"];',
'[keyword echo] [string "aaa\\$aaaa[[2]]aaa.aaa"];',
'[keyword echo] [string "aaa\\$aaaa[[asd]]aaa.aaa"];',
'[keyword echo] [string "aaa{\\$aaaa->aaa.aaa"];',
'[keyword echo] [string "aaa{\\$aaaa[[2]]aaa.aaa"];',
'[keyword echo] [string "aaa{\\aaaaa[[asd]]aaa.aaa"];',
'[keyword echo] [string "aaa\\${aaaa->aaa.aaa"];',
'[keyword echo] [string "aaa\\${aaaa[[2]]aaa.aaa"];',
'[keyword echo] [string "aaa\\${aaaa[[asd]]aaa.aaa"];',
'[meta ?>]');
MT('variable_interpolation_complex_syntax_1',
'[meta <?php]',
'[keyword echo] [string "aaa][variable-2 $]{[variable aaaa]}[string ->aaa.aaa"];',
'[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa"];',
'[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa][[',' [number 42]',']]}[string ->aaa.aaa"];',
'[keyword echo] [string "aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa');
MT('variable_interpolation_complex_syntax_2',
'[meta <?php] [comment /* Monsters */]',
'[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>} $aaa<?php } */]}[string ->aaa.aaa"];',
'[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>*/][[',' [string "aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string "]',']]}[string ->aaa.aaa"];',
'[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa"];');
function build_recursive_monsters(nt, t, n){
var monsters = [t];
for (var i = 1; i <= n; ++i)
monsters[i] = nt.join(monsters[i - 1]);
return monsters;
}
var m1 = build_recursive_monsters(
['[string "][variable-2 $]{[variable aaa] [operator +] ', '}[string "]'],
'[comment /* }?>} */] [string "aaa][variable-2 $aaa][string .aaa"]',
10
);
MT('variable_interpolation_complex_syntax_3_1',
'[meta <?php] [comment /* Recursive monsters */]',
'[keyword echo] ' + m1[4] + ';',
'[keyword echo] ' + m1[7] + ';',
'[keyword echo] ' + m1[8] + ';',
'[keyword echo] ' + m1[5] + ';',
'[keyword echo] ' + m1[1] + ';',
'[keyword echo] ' + m1[6] + ';',
'[keyword echo] ' + m1[9] + ';',
'[keyword echo] ' + m1[0] + ';',
'[keyword echo] ' + m1[10] + ';',
'[keyword echo] ' + m1[2] + ';',
'[keyword echo] ' + m1[3] + ';',
'[keyword echo] [string "end"];',
'[meta ?>]');
var m2 = build_recursive_monsters(
['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a"]'],
'[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
5
);
MT('variable_interpolation_complex_syntax_3_2',
'[meta <?php] [comment /* Recursive monsters 2 */]',
'[keyword echo] ' + m2[0] + ';',
'[keyword echo] ' + m2[1] + ';',
'[keyword echo] ' + m2[5] + ';',
'[keyword echo] ' + m2[4] + ';',
'[keyword echo] ' + m2[2] + ';',
'[keyword echo] ' + m2[3] + ';',
'[keyword echo] [string "end"];',
'[meta ?>]');
function build_recursive_monsters_2(mf1, mf2, nt, t, n){
var monsters = [t];
for (var i = 1; i <= n; ++i)
monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3];
return monsters;
}
var m3 = build_recursive_monsters_2(
m1,
m2,
['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a"]'],
'[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
4
);
MT('variable_interpolation_complex_syntax_3_3',
'[meta <?php] [comment /* Recursive monsters 2 */]',
'[keyword echo] ' + m3[4] + ';',
'[keyword echo] ' + m3[0] + ';',
'[keyword echo] ' + m3[3] + ';',
'[keyword echo] ' + m3[1] + ';',
'[keyword echo] ' + m3[2] + ';',
'[keyword echo] [string "end"];',
'[meta ?>]');
MT("variable_interpolation_heredoc",
"[meta <?php]",
"[string <<<here]",
"[string doc ][variable-2 $]{[variable yay]}[string more]",
"[string here]; [comment // normal]");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/stex/test.js 0000644 00000006042 15114246362 0033656 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "stex");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("word",
"foo");
MT("twoWords",
"foo bar");
MT("beginEndDocument",
"[tag \\begin][bracket {][atom document][bracket }]",
"[tag \\end][bracket {][atom document][bracket }]");
MT("beginEndEquation",
"[tag \\begin][bracket {][atom equation][bracket }]",
" E=mc^2",
"[tag \\end][bracket {][atom equation][bracket }]");
MT("beginModule",
"[tag \\begin][bracket {][atom module][bracket }[[]]]");
MT("beginModuleId",
"[tag \\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]");
MT("importModule",
"[tag \\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]");
MT("importModulePath",
"[tag \\importmodule][bracket [[][tag \\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]");
MT("psForPDF",
"[tag \\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]");
MT("comment",
"[comment % foo]");
MT("tagComment",
"[tag \\item][comment % bar]");
MT("commentTag",
" [comment % \\item]");
MT("commentLineBreak",
"[comment %]",
"foo");
MT("tagErrorCurly",
"[tag \\begin][error }][bracket {]");
MT("tagErrorSquare",
"[tag \\item][error ]]][bracket {]");
MT("commentCurly",
"[comment % }]");
MT("tagHash",
"the [tag \\#] key");
MT("tagNumber",
"a [tag \\$][atom 5] stetson");
MT("tagPercent",
"[atom 100][tag \\%] beef");
MT("tagAmpersand",
"L [tag \\&] N");
MT("tagUnderscore",
"foo[tag \\_]bar");
MT("tagBracketOpen",
"[tag \\emph][bracket {][tag \\{][bracket }]");
MT("tagBracketClose",
"[tag \\emph][bracket {][tag \\}][bracket }]");
MT("tagLetterNumber",
"section [tag \\S][atom 1]");
MT("textTagNumber",
"para [tag \\P][atom 2]");
MT("thinspace",
"x[tag \\,]y");
MT("thickspace",
"x[tag \\;]y");
MT("negativeThinspace",
"x[tag \\!]y");
MT("periodNotSentence",
"J.\\ L.\\ is");
MT("periodSentence",
"X[tag \\@]. The");
MT("italicCorrection",
"[bracket {][tag \\em] If[tag \\/][bracket }] I");
MT("tagBracket",
"[tag \\newcommand][bracket {][tag \\pop][bracket }]");
MT("inlineMathTagFollowedByNumber",
"[keyword $][tag \\pi][number 2][keyword $]");
MT("inlineMath",
"[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword $] other text");
MT("displayMath",
"More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text");
MT("mathWithComment",
"[keyword $][variable-2 x] [comment % $]",
"[variable-2 y][keyword $] other text");
MT("lineBreakArgument",
"[tag \\\\][bracket [[][atom 1cm][bracket ]]]");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/xquery/test.js 0000644 00000011764 15114247501 0034233 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Don't take these too seriously -- the expected results appear to be
// based on the results of actual runs without any serious manual
// verification. If a change you made causes them to fail, the test is
// as likely to wrong as the code.
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "xquery");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("eviltest",
"[keyword xquery] [keyword version] [variable "1][keyword .][atom 0][keyword -][variable ml"][def&variable ;] [comment (: this is : a \"comment\" :)]",
" [keyword let] [variable $let] [keyword :=] [variable <x] [variable attr][keyword =][variable "value">"test"<func>][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable <][keyword /][variable func><][keyword /][variable x>]",
" [keyword let] [variable $joe][keyword :=][atom 1]",
" [keyword return] [keyword element] [variable element] {",
" [keyword attribute] [variable attribute] { [atom 1] },",
" [keyword element] [variable test] { [variable 'a'] }, [keyword attribute] [variable foo] { [variable "bar"] },",
" [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],",
" [keyword //][variable x] } [comment (: a more 'evil' test :)]",
" [comment (: Modified Blakeley example (: with nested comment :) ... :)]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:declare]() {()}[variable ;]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:private]() {()}[variable ;]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:function]() {()}[variable ;]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:local]() {()}[variable ;]",
" [keyword let] [variable $let] [keyword :=] [variable <let>let] [variable $let] [keyword :=] [variable "let"<][keyword /let][variable >]",
" [keyword return] [keyword element] [variable element] {",
" [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },",
" [keyword attribute] [variable fn:doc] { [variable "bar"] [variable castable] [keyword as] [atom xs:string] },",
" [keyword element] [variable text] { [keyword text] { [variable "text"] } },",
" [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],",
" [keyword //][variable fn:doc]",
" }");
MT("testEmptySequenceKeyword",
"[string \"foo\"] [keyword instance] [keyword of] [keyword empty-sequence]()");
MT("testMultiAttr",
"[tag <p ][attribute a1]=[string \"foo\"] [attribute a2]=[string \"bar\"][tag >][variable hello] [variable world][tag </p>]");
MT("test namespaced variable",
"[keyword declare] [keyword namespace] [variable e] [keyword =] [string \"http://example.com/ANamespace\"][variable ;declare] [keyword variable] [variable $e:exampleComThisVarIsNotRecognized] [keyword as] [keyword element]([keyword *]) [variable external;]");
MT("test EQName variable",
"[keyword declare] [keyword variable] [variable $\"http://www.example.com/ns/my\":var] [keyword :=] [atom 12][variable ;]",
"[tag <out>]{[variable $\"http://www.example.com/ns/my\":var]}[tag </out>]");
MT("test EQName function",
"[keyword declare] [keyword function] [def&variable \"http://www.example.com/ns/my\":fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {",
" [variable $a] [keyword +] [atom 2]",
"}[variable ;]",
"[tag <out>]{[def&variable \"http://www.example.com/ns/my\":fn]([atom 12])}[tag </out>]");
MT("test EQName function with single quotes",
"[keyword declare] [keyword function] [def&variable 'http://www.example.com/ns/my':fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {",
" [variable $a] [keyword +] [atom 2]",
"}[variable ;]",
"[tag <out>]{[def&variable 'http://www.example.com/ns/my':fn]([atom 12])}[tag </out>]");
MT("testProcessingInstructions",
"[def&variable data]([comment&meta <?target content?>]) [keyword instance] [keyword of] [atom xs:string]");
MT("testQuoteEscapeDouble",
"[keyword let] [variable $rootfolder] [keyword :=] [string \"c:\\builds\\winnt\\HEAD\\qa\\scripts\\\"]",
"[keyword let] [variable $keysfolder] [keyword :=] [def&variable concat]([variable $rootfolder], [string \"keys\\\"])");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/verilog/test.js 0000644 00000015171 15114251413 0034336 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4}, "verilog");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("binary_literals",
"[number 1'b0]",
"[number 1'b1]",
"[number 1'bx]",
"[number 1'bz]",
"[number 1'bX]",
"[number 1'bZ]",
"[number 1'B0]",
"[number 1'B1]",
"[number 1'Bx]",
"[number 1'Bz]",
"[number 1'BX]",
"[number 1'BZ]",
"[number 1'b0]",
"[number 1'b1]",
"[number 2'b01]",
"[number 2'bxz]",
"[number 2'b11]",
"[number 2'b10]",
"[number 2'b1Z]",
"[number 12'b0101_0101_0101]",
"[number 1'b 0]",
"[number 'b0101]"
);
MT("octal_literals",
"[number 3'o7]",
"[number 3'O7]",
"[number 3'so7]",
"[number 3'SO7]"
);
MT("decimal_literals",
"[number 0]",
"[number 1]",
"[number 7]",
"[number 123_456]",
"[number 'd33]",
"[number 8'd255]",
"[number 8'D255]",
"[number 8'sd255]",
"[number 8'SD255]",
"[number 32'd123]",
"[number 32 'd123]",
"[number 32 'd 123]"
);
MT("hex_literals",
"[number 4'h0]",
"[number 4'ha]",
"[number 4'hF]",
"[number 4'hx]",
"[number 4'hz]",
"[number 4'hX]",
"[number 4'hZ]",
"[number 32'hdc78]",
"[number 32'hDC78]",
"[number 32 'hDC78]",
"[number 32'h DC78]",
"[number 32 'h DC78]",
"[number 32'h44x7]",
"[number 32'hFFF?]"
);
MT("real_number_literals",
"[number 1.2]",
"[number 0.1]",
"[number 2394.26331]",
"[number 1.2E12]",
"[number 1.2e12]",
"[number 1.30e-2]",
"[number 0.1e-0]",
"[number 23E10]",
"[number 29E-2]",
"[number 236.123_763_e-12]"
);
MT("operators",
"[meta ^]"
);
MT("keywords",
"[keyword logic]",
"[keyword logic] [variable foo]",
"[keyword reg] [variable abc]"
);
MT("variables",
"[variable _leading_underscore]",
"[variable _if]",
"[number 12] [variable foo]",
"[variable foo] [number 14]"
);
MT("tick_defines",
"[def `FOO]",
"[def `foo]",
"[def `FOO_bar]"
);
MT("system_calls",
"[meta $display]",
"[meta $vpi_printf]"
);
MT("line_comment", "[comment // Hello world]");
// Alignment tests
MT("align_port_map_style1",
/**
* mod mod(.a(a),
* .b(b)
* );
*/
"[variable mod] [variable mod][bracket (].[variable a][bracket (][variable a][bracket )],",
" .[variable b][bracket (][variable b][bracket )]",
" [bracket )];",
""
);
MT("align_port_map_style2",
/**
* mod mod(
* .a(a),
* .b(b)
* );
*/
"[variable mod] [variable mod][bracket (]",
" .[variable a][bracket (][variable a][bracket )],",
" .[variable b][bracket (][variable b][bracket )]",
"[bracket )];",
""
);
// Indentation tests
MT("indent_single_statement_if",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword break];",
""
);
MT("no_indent_after_single_line_if",
"[keyword if] [bracket (][variable foo][bracket )] [keyword break];",
""
);
MT("indent_after_if_begin_same_line",
"[keyword if] [bracket (][variable foo][bracket )] [keyword begin]",
" [keyword break];",
" [keyword break];",
"[keyword end]",
""
);
MT("indent_after_if_begin_next_line",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword begin]",
" [keyword break];",
" [keyword break];",
" [keyword end]",
""
);
MT("indent_single_statement_if_else",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword break];",
"[keyword else]",
" [keyword break];",
""
);
MT("indent_if_else_begin_same_line",
"[keyword if] [bracket (][variable foo][bracket )] [keyword begin]",
" [keyword break];",
" [keyword break];",
"[keyword end] [keyword else] [keyword begin]",
" [keyword break];",
" [keyword break];",
"[keyword end]",
""
);
MT("indent_if_else_begin_next_line",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword begin]",
" [keyword break];",
" [keyword break];",
" [keyword end]",
"[keyword else]",
" [keyword begin]",
" [keyword break];",
" [keyword break];",
" [keyword end]",
""
);
MT("indent_if_nested_without_begin",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword if] [bracket (][variable foo][bracket )]",
" [keyword if] [bracket (][variable foo][bracket )]",
" [keyword break];",
""
);
MT("indent_case",
"[keyword case] [bracket (][variable state][bracket )]",
" [variable FOO]:",
" [keyword break];",
" [variable BAR]:",
" [keyword break];",
"[keyword endcase]",
""
);
MT("unindent_after_end_with_preceding_text",
"[keyword begin]",
" [keyword break]; [keyword end]",
""
);
MT("export_function_one_line_does_not_indent",
"[keyword export] [string \"DPI-C\"] [keyword function] [variable helloFromSV];",
""
);
MT("export_task_one_line_does_not_indent",
"[keyword export] [string \"DPI-C\"] [keyword task] [variable helloFromSV];",
""
);
MT("export_function_two_lines_indents_properly",
"[keyword export]",
" [string \"DPI-C\"] [keyword function] [variable helloFromSV];",
""
);
MT("export_task_two_lines_indents_properly",
"[keyword export]",
" [string \"DPI-C\"] [keyword task] [variable helloFromSV];",
""
);
MT("import_function_one_line_does_not_indent",
"[keyword import] [string \"DPI-C\"] [keyword function] [variable helloFromC];",
""
);
MT("import_task_one_line_does_not_indent",
"[keyword import] [string \"DPI-C\"] [keyword task] [variable helloFromC];",
""
);
MT("import_package_single_line_does_not_indent",
"[keyword import] [variable p]::[variable x];",
"[keyword import] [variable p]::[variable y];",
""
);
MT("covergroup_with_function_indents_properly",
"[keyword covergroup] [variable cg] [keyword with] [keyword function] [variable sample][bracket (][keyword bit] [variable b][bracket )];",
" [variable c] : [keyword coverpoint] [variable c];",
"[keyword endgroup]: [variable cg]",
""
);
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/python/test.js 0000644 00000002223 15114251516 0034206 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4},
{name: "python",
version: 3,
singleLineStringErrors: false});
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Error, because "foobarhello" is neither a known type or property, but
// property was expected (after "and"), and it should be in parentheses.
MT("decoratorStartOfLine",
"[meta @dec]",
"[keyword def] [def function]():",
" [keyword pass]");
MT("decoratorIndented",
"[keyword class] [def Foo]:",
" [meta @dec]",
" [keyword def] [def function]():",
" [keyword pass]");
MT("matmulWithSpace:", "[variable a] [operator @] [variable b]");
MT("matmulWithoutSpace:", "[variable a][operator @][variable b]");
MT("matmulSpaceBefore:", "[variable a] [operator @][variable b]");
MT("fValidStringPrefix", "[string f'this is a {formatted} string']");
MT("uValidStringPrefix", "[string u'this is an unicode string']");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/rust/test.js 0000644 00000001740 15114306700 0027420 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4}, "rust");
function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));}
MT('integer_test',
'[number 123i32]',
'[number 123u32]',
'[number 123_u32]',
'[number 0xff_u8]',
'[number 0o70_i16]',
'[number 0b1111_1111_1001_0000_i32]',
'[number 0usize]');
MT('float_test',
'[number 123.0f64]',
'[number 0.1f64]',
'[number 0.1f32]',
'[number 12E+99_f64]');
MT('string-literals-test',
'[string "foo"]',
'[string r"foo"]',
'[string "\\"foo\\""]',
'[string r#""foo""#]',
'[string "foo #\\"# bar"]',
'[string b"foo"]',
'[string br"foo"]',
'[string b"\\"foo\\""]',
'[string br#""foo""#]',
'[string br##"foo #" bar"##]',
"[string-2 'h']",
"[string-2 b'h']");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/gfm/test.js 0000644 00000016624 15114310531 0027200 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "gfm");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "gfm", highlightFormatting: true});
function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
FT("codeBackticks",
"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
FT("doubleBackticks",
"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
FT("codeBlock",
"[comment&formatting&formatting-code-block ```css]",
"[tag foo]",
"[comment&formatting&formatting-code-block ```]");
FT("taskList",
"[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2 foo]",
"[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2 foo]");
FT("formatting_strikethrough",
"[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]");
FT("formatting_strikethrough",
"foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]");
MT("emInWordAsterisk",
"foo[em *bar*]hello");
MT("emInWordUnderscore",
"foo_bar_hello");
MT("emStrongUnderscore",
"[strong __][em&strong _foo__][em _] bar");
MT("fencedCodeBlocks",
"[comment ```]",
"[comment foo]",
"",
"[comment ```]",
"bar");
MT("fencedCodeBlockModeSwitching",
"[comment ```javascript]",
"[variable foo]",
"",
"[comment ```]",
"bar");
MT("fencedCodeBlockModeSwitchingObjc",
"[comment ```objective-c]",
"[keyword @property] [variable NSString] [operator *] [variable foo];",
"[comment ```]",
"bar");
MT("fencedCodeBlocksNoTildes",
"~~~",
"foo",
"~~~");
MT("taskListAsterisk",
"[variable-2 * []] foo]", // Invalid; must have space or x between []
"[variable-2 * [ ]]bar]", // Invalid; must have space after ]
"[variable-2 * [x]]hello]", // Invalid; must have space after ]
"[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("taskListPlus",
"[variable-2 + []] foo]", // Invalid; must have space or x between []
"[variable-2 + [ ]]bar]", // Invalid; must have space after ]
"[variable-2 + [x]]hello]", // Invalid; must have space after ]
"[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("taskListDash",
"[variable-2 - []] foo]", // Invalid; must have space or x between []
"[variable-2 - [ ]]bar]", // Invalid; must have space after ]
"[variable-2 - [x]]hello]", // Invalid; must have space after ]
"[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("taskListNumber",
"[variable-2 1. []] foo]", // Invalid; must have space or x between []
"[variable-2 2. [ ]]bar]", // Invalid; must have space after ]
"[variable-2 3. [x]]hello]", // Invalid; must have space after ]
"[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
" [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested
MT("SHA",
"foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar");
MT("SHAEmphasis",
"[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
MT("shortSHA",
"foo [link be6a8cc] bar");
MT("tooShortSHA",
"foo be6a8c bar");
MT("longSHA",
"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar");
MT("badSHA",
"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar");
MT("userSHA",
"foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello");
MT("userSHAEmphasis",
"[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
MT("userProjectSHA",
"foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world");
MT("userProjectSHAEmphasis",
"[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
MT("num",
"foo [link #1] bar");
MT("numEmphasis",
"[em *foo ][em&link #1][em *]");
MT("badNum",
"foo #1bar hello");
MT("userNum",
"foo [link bar#1] hello");
MT("userNumEmphasis",
"[em *foo ][em&link bar#1][em *]");
MT("userProjectNum",
"foo [link bar/hello#1] world");
MT("userProjectNumEmphasis",
"[em *foo ][em&link bar/hello#1][em *]");
MT("vanillaLink",
"foo [link http://www.example.com/] bar");
MT("vanillaLinkNoScheme",
"foo [link www.example.com] bar");
MT("vanillaLinkHttps",
"foo [link https://www.example.com/] bar");
MT("vanillaLinkDataSchema",
"foo [link data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==] bar");
MT("vanillaLinkPunctuation",
"foo [link http://www.example.com/]. bar");
MT("vanillaLinkExtension",
"foo [link http://www.example.com/index.html] bar");
MT("vanillaLinkEmphasis",
"foo [em *][em&link http://www.example.com/index.html][em *] bar");
MT("notALink",
"foo asfd:asdf bar");
MT("notALink",
"[comment ```css]",
"[tag foo] {[property color]:[keyword black];}",
"[comment ```][link http://www.example.com/]");
MT("notALink",
"[comment ``foo `bar` http://www.example.com/``] hello");
MT("notALink",
"[comment `foo]",
"[comment&link http://www.example.com/]",
"[comment `] foo",
"",
"[link http://www.example.com/]");
MT("headerCodeBlockGithub",
"[header&header-1 # heading]",
"",
"[comment ```]",
"[comment code]",
"[comment ```]",
"",
"Commit: [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2]",
"Issue: [link #1]",
"Link: [link http://www.example.com/]");
MT("strikethrough",
"[strikethrough ~~foo~~]");
MT("strikethroughWithStartingSpace",
"~~ foo~~");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo~~~]");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo ~~]");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo ~~ bar]");
MT("strikethroughUnclosedStrayTildes",
"[strikethrough ~~foo ~~ bar~~]hello");
MT("strikethroughOneLetter",
"[strikethrough ~~a~~]");
MT("strikethroughWrapped",
"[strikethrough ~~foo]",
"[strikethrough foo~~]");
MT("strikethroughParagraph",
"[strikethrough ~~foo]",
"",
"foo[strikethrough ~~bar]");
MT("strikethroughEm",
"[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]");
MT("strikethroughEm",
"[em *][em&strikethrough ~~foo~~][em *]");
MT("strikethroughStrong",
"[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]");
MT("strikethroughStrong",
"[strong **][strong&strikethrough ~~foo~~][strong **]");
})();
xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/markdown/test.js 0000644 00000071736 15114313376 0030211 0 ustar 00 home // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "markdown");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "markdown", highlightFormatting: true});
function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
var modeAtxNoSpace = CodeMirror.getMode({tabSize: 4}, {name: "markdown", allowAtxHeaderWithoutSpace: true});
function AtxNoSpaceTest(name) { test.mode(name, modeAtxNoSpace, Array.prototype.slice.call(arguments, 1)); }
var modeFenced = CodeMirror.getMode({tabSize: 4}, {name: "markdown", fencedCodeBlocks: true});
function FencedTest(name) { test.mode(name, modeFenced, Array.prototype.slice.call(arguments, 1)); }
var modeOverrideClasses = CodeMirror.getMode({tabsize: 4}, {
name: "markdown",
strikethrough: true,
tokenTypeOverrides: {
"header" : "override-header",
"code" : "override-code",
"quote" : "override-quote",
"list1" : "override-list1",
"list2" : "override-list2",
"list3" : "override-list3",
"hr" : "override-hr",
"image" : "override-image",
"imageAltText": "override-image-alt-text",
"imageMarker": "override-image-marker",
"linkInline" : "override-link-inline",
"linkEmail" : "override-link-email",
"linkText" : "override-link-text",
"linkHref" : "override-link-href",
"em" : "override-em",
"strong" : "override-strong",
"strikethrough" : "override-strikethrough"
}});
function TokenTypeOverrideTest(name) { test.mode(name, modeOverrideClasses, Array.prototype.slice.call(arguments, 1)); }
var modeFormattingOverride = CodeMirror.getMode({tabsize: 4}, {
name: "markdown",
highlightFormatting: true,
tokenTypeOverrides: {
"formatting" : "override-formatting"
}});
function FormatTokenTypeOverrideTest(name) { test.mode(name, modeFormattingOverride, Array.prototype.slice.call(arguments, 1)); }
FT("formatting_emAsterisk",
"[em&formatting&formatting-em *][em foo][em&formatting&formatting-em *]");
FT("formatting_emUnderscore",
"[em&formatting&formatting-em _][em foo][em&formatting&formatting-em _]");
FT("formatting_strongAsterisk",
"[strong&formatting&formatting-strong **][strong foo][strong&formatting&formatting-strong **]");
FT("formatting_strongUnderscore",
"[strong&formatting&formatting-strong __][strong foo][strong&formatting&formatting-strong __]");
FT("formatting_codeBackticks",
"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
FT("formatting_doubleBackticks",
"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
FT("formatting_atxHeader",
"[header&header-1&formatting&formatting-header&formatting-header-1 # ][header&header-1 foo # bar ][header&header-1&formatting&formatting-header&formatting-header-1 #]");
FT("formatting_setextHeader",
"foo",
"[header&header-1&formatting&formatting-header&formatting-header-1 =]");
FT("formatting_blockquote",
"[quote"e-1&formatting&formatting-quote&formatting-quote-1 > ][quote"e-1 foo]");
FT("formatting_list",
"[variable-2&formatting&formatting-list&formatting-list-ul - ][variable-2 foo]");
FT("formatting_list",
"[variable-2&formatting&formatting-list&formatting-list-ol 1. ][variable-2 foo]");
FT("formatting_link",
"[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string&url (][string&url http://example.com/][string&formatting&formatting-link-string&url )]");
FT("formatting_linkReference",
"[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string&url [][string&url bar][string&formatting&formatting-link-string&url ]]]",
"[link&formatting&formatting-link [][link bar][link&formatting&formatting-link ]]:] [string&url http://example.com/]");
FT("formatting_linkWeb",
"[link&formatting&formatting-link <][link http://example.com/][link&formatting&formatting-link >]");
FT("formatting_linkEmail",
"[link&formatting&formatting-link <][link user@example.com][link&formatting&formatting-link >]");
FT("formatting_escape",
"[formatting-escape \\*]");
FT("formatting_image",
"[formatting&formatting-image&image&image-marker !][formatting&formatting-image&image&image-alt-text&link [[][image&image-alt-text&link alt text][formatting&formatting-image&image&image-alt-text&link ]]][formatting&formatting-link-string&string&url (][url&string http://link.to/image.jpg][formatting&formatting-link-string&string&url )]");
MT("plainText",
"foo");
// Don't style single trailing space
MT("trailingSpace1",
"foo ");
// Two or more trailing spaces should be styled with line break character
MT("trailingSpace2",
"foo[trailing-space-a ][trailing-space-new-line ]");
MT("trailingSpace3",
"foo[trailing-space-a ][trailing-space-b ][trailing-space-new-line ]");
MT("trailingSpace4",
"foo[trailing-space-a ][trailing-space-b ][trailing-space-a ][trailing-space-new-line ]");
// Code blocks using 4 spaces (regardless of CodeMirror.tabSize value)
MT("codeBlocksUsing4Spaces",
" [comment foo]");
// Code blocks using 4 spaces with internal indentation
MT("codeBlocksUsing4SpacesIndentation",
" [comment bar]",
" [comment hello]",
" [comment world]",
" [comment foo]",
"bar");
// Code blocks should end even after extra indented lines
MT("codeBlocksWithTrailingIndentedLine",
" [comment foo]",
" [comment bar]",
" [comment baz]",
" ",
"hello");
// Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value)
MT("codeBlocksUsing1Tab",
"\t[comment foo]");
// No code blocks directly after paragraph
// http://spec.commonmark.org/0.19/#example-65
MT("noCodeBlocksAfterParagraph",
"Foo",
" Bar");
// Inline code using backticks
MT("inlineCodeUsingBackticks",
"foo [comment `bar`]");
// Block code using single backtick (shouldn't work)
MT("blockCodeSingleBacktick",
"[comment `]",
"[comment foo]",
"[comment `]");
// Unclosed backticks
// Instead of simply marking as CODE, it would be nice to have an
// incomplete flag for CODE, that is styled slightly different.
MT("unclosedBackticks",
"foo [comment `bar]");
// Per documentation: "To include a literal backtick character within a
// code span, you can use multiple backticks as the opening and closing
// delimiters"
MT("doubleBackticks",
"[comment ``foo ` bar``]");
// Tests based on Dingus
// http://daringfireball.net/projects/markdown/dingus
//
// Multiple backticks within an inline code block
MT("consecutiveBackticks",
"[comment `foo```bar`]");
// Multiple backticks within an inline code block with a second code block
MT("consecutiveBackticks",
"[comment `foo```bar`] hello [comment `world`]");
// Unclosed with several different groups of backticks
MT("unclosedBackticks",
"[comment ``foo ``` bar` hello]");
// Closed with several different groups of backticks
MT("closedBackticks",
"[comment ``foo ``` bar` hello``] world");
// atx headers
// http://daringfireball.net/projects/markdown/syntax#header
MT("atxH1",
"[header&header-1 # foo]");
MT("atxH2",
"[header&header-2 ## foo]");
MT("atxH3",
"[header&header-3 ### foo]");
MT("atxH4",
"[header&header-4 #### foo]");
MT("atxH5",
"[header&header-5 ##### foo]");
MT("atxH6",
"[header&header-6 ###### foo]");
// http://spec.commonmark.org/0.19/#example-24
MT("noAtxH7",
"####### foo");
// http://spec.commonmark.org/0.19/#example-25
MT("noAtxH1WithoutSpace",
"#5 bolt");
// CommonMark requires a space after # but most parsers don't
AtxNoSpaceTest("atxNoSpaceAllowed_H1NoSpace",
"[header&header-1 #foo]");
AtxNoSpaceTest("atxNoSpaceAllowed_H4NoSpace",
"[header&header-4 ####foo]");
AtxNoSpaceTest("atxNoSpaceAllowed_H1Space",
"[header&header-1 # foo]");
// Inline styles should be parsed inside headers
MT("atxH1inline",
"[header&header-1 # foo ][header&header-1&em *bar*]");
// Setext headers - H1, H2
// Per documentation, "Any number of underlining =’s or -’s will work."
// http://daringfireball.net/projects/markdown/syntax#header
// Ideally, the text would be marked as `header` as well, but this is
// not really feasible at the moment. So, instead, we're testing against
// what works today, to avoid any regressions.
//
// Check if single underlining = works
MT("setextH1",
"foo",
"[header&header-1 =]");
// Check if 3+ ='s work
MT("setextH1",
"foo",
"[header&header-1 ===]");
// Check if single underlining - works
MT("setextH2",
"foo",
"[header&header-2 -]");
// Check if 3+ -'s work
MT("setextH2",
"foo",
"[header&header-2 ---]");
// http://spec.commonmark.org/0.19/#example-45
MT("setextH2AllowSpaces",
"foo",
" [header&header-2 ---- ]");
// http://spec.commonmark.org/0.19/#example-44
MT("noSetextAfterIndentedCodeBlock",
" [comment foo]",
"[hr ---]");
// http://spec.commonmark.org/0.19/#example-51
MT("noSetextAfterQuote",
"[quote"e-1 > foo]",
"[hr ---]");
MT("noSetextAfterList",
"[variable-2 - foo]",
"[hr ---]");
// Single-line blockquote with trailing space
MT("blockquoteSpace",
"[quote"e-1 > foo]");
// Single-line blockquote
MT("blockquoteNoSpace",
"[quote"e-1 >foo]");
// No blank line before blockquote
MT("blockquoteNoBlankLine",
"foo",
"[quote"e-1 > bar]");
// Nested blockquote
MT("blockquoteSpace",
"[quote"e-1 > foo]",
"[quote"e-1 >][quote"e-2 > foo]",
"[quote"e-1 >][quote"e-2 >][quote"e-3 > foo]");
// Single-line blockquote followed by normal paragraph
MT("blockquoteThenParagraph",
"[quote"e-1 >foo]",
"",
"bar");
// Multi-line blockquote (lazy mode)
MT("multiBlockquoteLazy",
"[quote"e-1 >foo]",
"[quote"e-1 bar]");
// Multi-line blockquote followed by normal paragraph (lazy mode)
MT("multiBlockquoteLazyThenParagraph",
"[quote"e-1 >foo]",
"[quote"e-1 bar]",
"",
"hello");
// Multi-line blockquote (non-lazy mode)
MT("multiBlockquote",
"[quote"e-1 >foo]",
"[quote"e-1 >bar]");
// Multi-line blockquote followed by normal paragraph (non-lazy mode)
MT("multiBlockquoteThenParagraph",
"[quote"e-1 >foo]",
"[quote"e-1 >bar]",
"",
"hello");
// Header with leading space after continued blockquote (#3287, negative indentation)
MT("headerAfterContinuedBlockquote",
"[quote"e-1 > foo]",
"[quote"e-1 bar]",
"",
" [header&header-1 # hello]");
// Check list types
MT("listAsterisk",
"foo",
"bar",
"",
"[variable-2 * foo]",
"[variable-2 * bar]");
MT("listPlus",
"foo",
"bar",
"",
"[variable-2 + foo]",
"[variable-2 + bar]");
MT("listDash",
"foo",
"bar",
"",
"[variable-2 - foo]",
"[variable-2 - bar]");
MT("listNumber",
"foo",
"bar",
"",
"[variable-2 1. foo]",
"[variable-2 2. bar]");
// Lists require a preceding blank line (per Dingus)
MT("listBogus",
"foo",
"1. bar",
"2. hello");
// List after hr
MT("listAfterHr",
"[hr ---]",
"[variable-2 - bar]");
// List after header
MT("listAfterHeader",
"[header&header-1 # foo]",
"[variable-2 - bar]");
// hr after list
MT("hrAfterList",
"[variable-2 - foo]",
"[hr -----]");
// Formatting in lists (*)
MT("listAsteriskFormatting",
"[variable-2 * ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 * ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 * ][variable-2&comment `foo`][variable-2 bar]");
// Formatting in lists (+)
MT("listPlusFormatting",
"[variable-2 + ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 + ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 + ][variable-2&comment `foo`][variable-2 bar]");
// Formatting in lists (-)
MT("listDashFormatting",
"[variable-2 - ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 - ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 - ][variable-2&comment `foo`][variable-2 bar]");
// Formatting in lists (1.)
MT("listNumberFormatting",
"[variable-2 1. ][variable-2&em *foo*][variable-2 bar]",
"[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]",
"[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
"[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]");
// Paragraph lists
MT("listParagraph",
"[variable-2 * foo]",
"",
"[variable-2 * bar]");
// Multi-paragraph lists
//
// 4 spaces
MT("listMultiParagraph",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [variable-2 hello]");
// 4 spaces, extra blank lines (should still be list, per Dingus)
MT("listMultiParagraphExtra",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
"",
" [variable-2 hello]");
// 4 spaces, plus 1 space (should still be list, per Dingus)
MT("listMultiParagraphExtraSpace",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [variable-2 hello]",
"",
" [variable-2 world]");
// 1 tab
MT("listTab",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
"\t[variable-2 hello]");
// No indent
MT("listNoIndent",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
"hello");
MT("listCommonMarkIndentationCode",
"[variable-2 * Code blocks also affect]",
" [variable-3 * The next level starts where the contents start.]",
" [variable-3 * Anything less than that will keep the item on the same level.]",
" [variable-3 * Each list item can indent the first level further and further.]",
" [variable-3 * For the most part, this makes sense while writing a list.]",
" [keyword * This means two items with same indentation can be different levels.]",
" [keyword * Each level has an indent requirement that can change between items.]",
" [keyword * A list item that meets this will be part of the next level.]",
" [variable-3 * Otherwise, it will be part of the level where it does meet this.]",
" [variable-2 * World]");
// Blockquote
MT("blockquote",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [variable-2"e"e-1 > hello]");
// Code block
MT("blockquoteCode",
"[variable-2 * foo]",
"",
"[variable-2 * bar]",
"",
" [comment > hello]",
"",
" [variable-2 world]");
// Code block followed by text
MT("blockquoteCodeText",
"[variable-2 * foo]",
"",
" [variable-2 bar]",
"",
" [comment hello]",
"",
" [variable-2 world]");
// Nested list
MT("listAsteriskNested",
"[variable-2 * foo]",
"",
" [variable-3 * bar]");
MT("listPlusNested",
"[variable-2 + foo]",
"",
" [variable-3 + bar]");
MT("listDashNested",
"[variable-2 - foo]",
"",
" [variable-3 - bar]");
MT("listNumberNested",
"[variable-2 1. foo]",
"",
" [variable-3 2. bar]");
MT("listMixed",
"[variable-2 * foo]",
"",
" [variable-3 + bar]",
"",
" [keyword - hello]",
"",
" [variable-2 1. world]");
MT("listBlockquote",
"[variable-2 * foo]",
"",
" [variable-3 + bar]",
"",
" [quote"e-1&variable-3 > hello]");
MT("listCode",
"[variable-2 * foo]",
"",
" [variable-3 + bar]",
"",
" [comment hello]");
// Code with internal indentation
MT("listCodeIndentation",
"[variable-2 * foo]",
"",
" [comment bar]",
" [comment hello]",
" [comment world]",
" [comment foo]",
" [variable-2 bar]");
// List nesting edge cases
MT("listNested",
"[variable-2 * foo]",
"",
" [variable-3 * bar]",
"",
" [variable-3 hello]"
);
MT("listNested",
"[variable-2 * foo]",
"",
" [variable-3 * bar]",
"",
" [keyword * foo]"
);
// Code followed by text
MT("listCodeText",
"[variable-2 * foo]",
"",
" [comment bar]",
"",
"hello");
// Following tests directly from official Markdown documentation
// http://daringfireball.net/projects/markdown/syntax#hr
MT("hrSpace",
"[hr * * *]");
MT("hr",
"[hr ***]");
MT("hrLong",
"[hr *****]");
MT("hrSpaceDash",
"[hr - - -]");
MT("hrDashLong",
"[hr ---------------------------------------]");
//Images
MT("Images",
"[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://link.to/image.jpg)]")
//Images with highlight alt text
MT("imageEm",
"[image&image-marker !][image&image-alt-text&link [[][image-alt-text&em&image&link *alt text*][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]");
MT("imageStrong",
"[image&image-marker !][image&image-alt-text&link [[][image-alt-text&strong&image&link **alt text**][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]");
MT("imageEmStrong",
"[image&image-marker !][image&image-alt-text&link [[][image-alt-text&image&strong&link **][image&image-alt-text&em&strong&link *alt text**][image&image-alt-text&em&link *][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]");
// Inline link with title
MT("linkTitle",
"[link [[foo]]][string&url (http://example.com/ \"bar\")] hello");
// Inline link without title
MT("linkNoTitle",
"[link [[foo]]][string&url (http://example.com/)] bar");
// Inline link with image
MT("linkImage",
"[link [[][link&image&image-marker !][link&image&image-alt-text&link [[alt text]]][string&url (http://link.to/image.jpg)][link ]]][string&url (http://example.com/)] bar");
// Inline link with Em
MT("linkEm",
"[link [[][link&em *foo*][link ]]][string&url (http://example.com/)] bar");
// Inline link with Strong
MT("linkStrong",
"[link [[][link&strong **foo**][link ]]][string&url (http://example.com/)] bar");
// Inline link with EmStrong
MT("linkEmStrong",
"[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url (http://example.com/)] bar");
// Image with title
MT("imageTitle",
"[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://example.com/ \"bar\")] hello");
// Image without title
MT("imageNoTitle",
"[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://example.com/)] bar");
// Image with asterisks
MT("imageAsterisks",
"[image&image-marker !][image&image-alt-text&link [[ ][image&image-alt-text&em&link *alt text*][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)] bar");
// Not a link. Should be normal text due to square brackets being used
// regularly in text, especially in quoted material, and no space is allowed
// between square brackets and parentheses (per Dingus).
MT("notALink",
"[[foo]] (bar)");
// Reference-style links
MT("linkReference",
"[link [[foo]]][string&url [[bar]]] hello");
// Reference-style links with Em
MT("linkReferenceEm",
"[link [[][link&em *foo*][link ]]][string&url [[bar]]] hello");
// Reference-style links with Strong
MT("linkReferenceStrong",
"[link [[][link&strong **foo**][link ]]][string&url [[bar]]] hello");
// Reference-style links with EmStrong
MT("linkReferenceEmStrong",
"[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url [[bar]]] hello");
// Reference-style links with optional space separator (per documentation)
// "You can optionally use a space to separate the sets of brackets"
MT("linkReferenceSpace",
"[link [[foo]]] [string&url [[bar]]] hello");
// Should only allow a single space ("...use *a* space...")
MT("linkReferenceDoubleSpace",
"[[foo]] [[bar]] hello");
// Reference-style links with implicit link name
MT("linkImplicit",
"[link [[foo]]][string&url [[]]] hello");
// @todo It would be nice if, at some point, the document was actually
// checked to see if the referenced link exists
// Link label, for reference-style links (taken from documentation)
MT("labelNoTitle",
"[link [[foo]]:] [string&url http://example.com/]");
MT("labelIndented",
" [link [[foo]]:] [string&url http://example.com/]");
MT("labelSpaceTitle",
"[link [[foo bar]]:] [string&url http://example.com/ \"hello\"]");
MT("labelDoubleTitle",
"[link [[foo bar]]:] [string&url http://example.com/ \"hello\"] \"world\"");
MT("labelTitleDoubleQuotes",
"[link [[foo]]:] [string&url http://example.com/ \"bar\"]");
MT("labelTitleSingleQuotes",
"[link [[foo]]:] [string&url http://example.com/ 'bar']");
MT("labelTitleParentheses",
"[link [[foo]]:] [string&url http://example.com/ (bar)]");
MT("labelTitleInvalid",
"[link [[foo]]:] [string&url http://example.com/] bar");
MT("labelLinkAngleBrackets",
"[link [[foo]]:] [string&url <http://example.com/> \"bar\"]");
MT("labelTitleNextDoubleQuotes",
"[link [[foo]]:] [string&url http://example.com/]",
"[string \"bar\"] hello");
MT("labelTitleNextSingleQuotes",
"[link [[foo]]:] [string&url http://example.com/]",
"[string 'bar'] hello");
MT("labelTitleNextParentheses",
"[link [[foo]]:] [string&url http://example.com/]",
"[string (bar)] hello");
MT("labelTitleNextMixed",
"[link [[foo]]:] [string&url http://example.com/]",
"(bar\" hello");
MT("labelEscape",
"[link [[foo \\]] ]]:] [string&url http://example.com/]");
MT("labelEscapeColon",
"[link [[foo \\]]: bar]]:] [string&url http://example.com/]");
MT("labelEscapeEnd",
"[[foo\\]]: http://example.com/");
MT("linkWeb",
"[link <http://example.com/>] foo");
MT("linkWebDouble",
"[link <http://example.com/>] foo [link <http://example.com/>]");
MT("linkEmail",
"[link <user@example.com>] foo");
MT("linkEmailDouble",
"[link <user@example.com>] foo [link <user@example.com>]");
MT("emAsterisk",
"[em *foo*] bar");
MT("emUnderscore",
"[em _foo_] bar");
MT("emInWordAsterisk",
"foo[em *bar*]hello");
MT("emInWordUnderscore",
"foo[em _bar_]hello");
// Per documentation: "...surround an * or _ with spaces, it’ll be
// treated as a literal asterisk or underscore."
MT("emEscapedBySpaceIn",
"foo [em _bar _ hello_] world");
MT("emEscapedBySpaceOut",
"foo _ bar[em _hello_]world");
MT("emEscapedByNewline",
"foo",
"_ bar[em _hello_]world");
// Unclosed emphasis characters
// Instead of simply marking as EM / STRONG, it would be nice to have an
// incomplete flag for EM and STRONG, that is styled slightly different.
MT("emIncompleteAsterisk",
"foo [em *bar]");
MT("emIncompleteUnderscore",
"foo [em _bar]");
MT("strongAsterisk",
"[strong **foo**] bar");
MT("strongUnderscore",
"[strong __foo__] bar");
MT("emStrongAsterisk",
"[em *foo][em&strong **bar*][strong hello**] world");
MT("emStrongUnderscore",
"[em _foo][em&strong __bar_][strong hello__] world");
// "...same character must be used to open and close an emphasis span.""
MT("emStrongMixed",
"[em _foo][em&strong **bar*hello__ world]");
MT("emStrongMixed",
"[em *foo][em&strong __bar_hello** world]");
MT("linkWithNestedParens",
"[link [[foo]]][string&url (bar(baz))]")
// These characters should be escaped:
// \ backslash
// ` backtick
// * asterisk
// _ underscore
// {} curly braces
// [] square brackets
// () parentheses
// # hash mark
// + plus sign
// - minus sign (hyphen)
// . dot
// ! exclamation mark
MT("escapeBacktick",
"foo \\`bar\\`");
MT("doubleEscapeBacktick",
"foo \\\\[comment `bar\\\\`]");
MT("escapeAsterisk",
"foo \\*bar\\*");
MT("doubleEscapeAsterisk",
"foo \\\\[em *bar\\\\*]");
MT("escapeUnderscore",
"foo \\_bar\\_");
MT("doubleEscapeUnderscore",
"foo \\\\[em _bar\\\\_]");
MT("escapeHash",
"\\# foo");
MT("doubleEscapeHash",
"\\\\# foo");
MT("escapeNewline",
"\\",
"[em *foo*]");
// Class override tests
TokenTypeOverrideTest("overrideHeader1",
"[override-header&override-header-1 # Foo]");
TokenTypeOverrideTest("overrideHeader2",
"[override-header&override-header-2 ## Foo]");
TokenTypeOverrideTest("overrideHeader3",
"[override-header&override-header-3 ### Foo]");
TokenTypeOverrideTest("overrideHeader4",
"[override-header&override-header-4 #### Foo]");
TokenTypeOverrideTest("overrideHeader5",
"[override-header&override-header-5 ##### Foo]");
TokenTypeOverrideTest("overrideHeader6",
"[override-header&override-header-6 ###### Foo]");
TokenTypeOverrideTest("overrideCode",
"[override-code `foo`]");
TokenTypeOverrideTest("overrideCodeBlock",
"[override-code ```]",
"[override-code foo]",
"[override-code ```]");
TokenTypeOverrideTest("overrideQuote",
"[override-quote&override-quote-1 > foo]",
"[override-quote&override-quote-1 > bar]");
TokenTypeOverrideTest("overrideQuoteNested",
"[override-quote&override-quote-1 > foo]",
"[override-quote&override-quote-1 >][override-quote&override-quote-2 > bar]",
"[override-quote&override-quote-1 >][override-quote&override-quote-2 >][override-quote&override-quote-3 > baz]");
TokenTypeOverrideTest("overrideLists",
"[override-list1 - foo]",
"",
" [override-list2 + bar]",
"",
" [override-list3 * baz]",
"",
" [override-list1 1. qux]",
"",
" [override-list2 - quux]");
TokenTypeOverrideTest("overrideHr",
"[override-hr * * *]");
TokenTypeOverrideTest("overrideImage",
"[override-image&override-image-marker !][override-image&override-image-alt-text&link [[alt text]]][override-link-href&url (http://link.to/image.jpg)]");
TokenTypeOverrideTest("overrideLinkText",
"[override-link-text [[foo]]][override-link-href&url (http://example.com)]");
TokenTypeOverrideTest("overrideLinkEmailAndInline",
"[override-link-email <][override-link-inline foo@example.com>]");
TokenTypeOverrideTest("overrideEm",
"[override-em *foo*]");
TokenTypeOverrideTest("overrideStrong",
"[override-strong **foo**]");
TokenTypeOverrideTest("overrideStrikethrough",
"[override-strikethrough ~~foo~~]");
FormatTokenTypeOverrideTest("overrideFormatting",
"[override-formatting-escape \\*]");
// Tests to make sure GFM-specific things aren't getting through
MT("taskList",
"[variable-2 * [ ]] bar]");
MT("noFencedCodeBlocks",
"~~~",
"foo",
"~~~");
FencedTest("fencedCodeBlocks",
"[comment ```]",
"[comment foo]",
"[comment ```]",
"bar");
FencedTest("fencedCodeBlocksMultipleChars",
"[comment `````]",
"[comment foo]",
"[comment ```]",
"[comment foo]",
"[comment `````]",
"bar");
FencedTest("fencedCodeBlocksTildes",
"[comment ~~~]",
"[comment foo]",
"[comment ~~~]",
"bar");
FencedTest("fencedCodeBlocksTildesMultipleChars",
"[comment ~~~~~]",
"[comment ~~~]",
"[comment foo]",
"[comment ~~~~~]",
"bar");
FencedTest("fencedCodeBlocksMultipleChars",
"[comment `````]",
"[comment foo]",
"[comment ```]",
"[comment foo]",
"[comment `````]",
"bar");
FencedTest("fencedCodeBlocksMixed",
"[comment ~~~]",
"[comment ```]",
"[comment foo]",
"[comment ~~~]",
"bar");
// Tests that require XML mode
MT("xmlMode",
"[tag&bracket <][tag div][tag&bracket >]",
"*foo*",
"[tag&bracket <][tag http://github.com][tag&bracket />]",
"[tag&bracket </][tag div][tag&bracket >]",
"[link <http://github.com/>]");
MT("xmlModeWithMarkdownInside",
"[tag&bracket <][tag div] [attribute markdown]=[string 1][tag&bracket >]",
"[em *foo*]",
"[link <http://github.com/>]",
"[tag </div>]",
"[link <http://github.com/>]",
"[tag&bracket <][tag div][tag&bracket >]",
"[tag&bracket </][tag div][tag&bracket >]");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/xml/test.js 0000644 00000003336 15114314362 0027231 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml";
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); }
MT("matching",
"[tag&bracket <][tag top][tag&bracket >]",
" text",
" [tag&bracket <][tag inner][tag&bracket />]",
"[tag&bracket </][tag top][tag&bracket >]");
MT("nonmatching",
"[tag&bracket <][tag top][tag&bracket >]",
" [tag&bracket <][tag inner][tag&bracket />]",
" [tag&bracket </][tag&error tip][tag&bracket&error >]");
MT("doctype",
"[meta <!doctype foobar>]",
"[tag&bracket <][tag top][tag&bracket />]");
MT("cdata",
"[tag&bracket <][tag top][tag&bracket >]",
" [atom <![CDATA[foo]",
"[atom barbazguh]]]]>]",
"[tag&bracket </][tag top][tag&bracket >]");
// HTML tests
mode = CodeMirror.getMode({indentUnit: 2}, "text/html");
MT("selfclose",
"[tag&bracket <][tag html][tag&bracket >]",
" [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]",
"[tag&bracket </][tag html][tag&bracket >]");
MT("list",
"[tag&bracket <][tag ol][tag&bracket >]",
" [tag&bracket <][tag li][tag&bracket >]one",
" [tag&bracket <][tag li][tag&bracket >]two",
"[tag&bracket </][tag ol][tag&bracket >]");
MT("valueless",
"[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]");
MT("pThenArticle",
"[tag&bracket <][tag p][tag&bracket >]",
" foo",
"[tag&bracket <][tag article][tag&bracket >]bar");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/ruby/test.js 0000644 00000000726 15114315756 0027422 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "ruby");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("divide_equal_operator",
"[variable bar] [operator /=] [variable foo]");
MT("divide_equal_operator_no_spacing",
"[variable foo][operator /=][number 42]");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/jsx/test.js 0000644 00000005626 15114316454 0027245 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "jsx")
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)) }
MT("selfclose",
"[keyword var] [def x] [operator =] [bracket&tag <] [tag foo] [bracket&tag />] [operator +] [number 1];")
MT("openclose",
"([bracket&tag <][tag foo][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("attr",
"([bracket&tag <][tag foo] [attribute abc]=[string 'value'][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("braced_attr",
"([bracket&tag <][tag foo] [attribute abc]={[number 10]}[bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("braced_text",
"([bracket&tag <][tag foo][bracket&tag >]hello {[number 10]} [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("nested_tag",
"([bracket&tag <][tag foo][bracket&tag ><][tag bar][bracket&tag ></][tag bar][bracket&tag ></][tag foo][bracket&tag >][operator ++])")
MT("nested_jsx",
"[keyword return] (",
" [bracket&tag <][tag foo][bracket&tag >]",
" say {[number 1] [operator +] [bracket&tag <][tag bar] [attribute attr]={[number 10]}[bracket&tag />]}!",
" [bracket&tag </][tag foo][bracket&tag >][operator ++]",
")")
MT("preserve_js_context",
"[variable x] [operator =] [string-2 `quasi${][bracket&tag <][tag foo][bracket&tag />][string-2 }quoted`]")
MT("line_comment",
"([bracket&tag <][tag foo] [comment // hello]",
" [bracket&tag ></][tag foo][bracket&tag >][operator ++])")
MT("line_comment_not_in_tag",
"([bracket&tag <][tag foo][bracket&tag >] // hello",
" [bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("block_comment",
"([bracket&tag <][tag foo] [comment /* hello]",
"[comment line 2]",
"[comment line 3 */] [bracket&tag ></][tag foo][bracket&tag >][operator ++])")
MT("block_comment_not_in_tag",
"([bracket&tag <][tag foo][bracket&tag >]/* hello",
" line 2",
" line 3 */ [bracket&tag </][tag foo][bracket&tag >][operator ++])")
MT("missing_attr",
"([bracket&tag <][tag foo] [attribute selected][bracket&tag />][operator ++])")
MT("indent_js",
"([bracket&tag <][tag foo][bracket&tag >]",
" [bracket&tag <][tag bar] [attribute baz]={[keyword function]() {",
" [keyword return] [number 10]",
" }}[bracket&tag />]",
" [bracket&tag </][tag foo][bracket&tag >])")
MT("spread",
"([bracket&tag <][tag foo] [attribute bar]={[meta ...][variable baz] [operator /][number 2]}[bracket&tag />])")
MT("tag_attribute",
"([bracket&tag <][tag foo] [attribute bar]=[bracket&tag <][tag foo][bracket&tag />/>][operator ++])")
})()
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/verilog/test.js0000644 00000015171 15114321331 0030072 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4}, "verilog");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("binary_literals",
"[number 1'b0]",
"[number 1'b1]",
"[number 1'bx]",
"[number 1'bz]",
"[number 1'bX]",
"[number 1'bZ]",
"[number 1'B0]",
"[number 1'B1]",
"[number 1'Bx]",
"[number 1'Bz]",
"[number 1'BX]",
"[number 1'BZ]",
"[number 1'b0]",
"[number 1'b1]",
"[number 2'b01]",
"[number 2'bxz]",
"[number 2'b11]",
"[number 2'b10]",
"[number 2'b1Z]",
"[number 12'b0101_0101_0101]",
"[number 1'b 0]",
"[number 'b0101]"
);
MT("octal_literals",
"[number 3'o7]",
"[number 3'O7]",
"[number 3'so7]",
"[number 3'SO7]"
);
MT("decimal_literals",
"[number 0]",
"[number 1]",
"[number 7]",
"[number 123_456]",
"[number 'd33]",
"[number 8'd255]",
"[number 8'D255]",
"[number 8'sd255]",
"[number 8'SD255]",
"[number 32'd123]",
"[number 32 'd123]",
"[number 32 'd 123]"
);
MT("hex_literals",
"[number 4'h0]",
"[number 4'ha]",
"[number 4'hF]",
"[number 4'hx]",
"[number 4'hz]",
"[number 4'hX]",
"[number 4'hZ]",
"[number 32'hdc78]",
"[number 32'hDC78]",
"[number 32 'hDC78]",
"[number 32'h DC78]",
"[number 32 'h DC78]",
"[number 32'h44x7]",
"[number 32'hFFF?]"
);
MT("real_number_literals",
"[number 1.2]",
"[number 0.1]",
"[number 2394.26331]",
"[number 1.2E12]",
"[number 1.2e12]",
"[number 1.30e-2]",
"[number 0.1e-0]",
"[number 23E10]",
"[number 29E-2]",
"[number 236.123_763_e-12]"
);
MT("operators",
"[meta ^]"
);
MT("keywords",
"[keyword logic]",
"[keyword logic] [variable foo]",
"[keyword reg] [variable abc]"
);
MT("variables",
"[variable _leading_underscore]",
"[variable _if]",
"[number 12] [variable foo]",
"[variable foo] [number 14]"
);
MT("tick_defines",
"[def `FOO]",
"[def `foo]",
"[def `FOO_bar]"
);
MT("system_calls",
"[meta $display]",
"[meta $vpi_printf]"
);
MT("line_comment", "[comment // Hello world]");
// Alignment tests
MT("align_port_map_style1",
/**
* mod mod(.a(a),
* .b(b)
* );
*/
"[variable mod] [variable mod][bracket (].[variable a][bracket (][variable a][bracket )],",
" .[variable b][bracket (][variable b][bracket )]",
" [bracket )];",
""
);
MT("align_port_map_style2",
/**
* mod mod(
* .a(a),
* .b(b)
* );
*/
"[variable mod] [variable mod][bracket (]",
" .[variable a][bracket (][variable a][bracket )],",
" .[variable b][bracket (][variable b][bracket )]",
"[bracket )];",
""
);
// Indentation tests
MT("indent_single_statement_if",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword break];",
""
);
MT("no_indent_after_single_line_if",
"[keyword if] [bracket (][variable foo][bracket )] [keyword break];",
""
);
MT("indent_after_if_begin_same_line",
"[keyword if] [bracket (][variable foo][bracket )] [keyword begin]",
" [keyword break];",
" [keyword break];",
"[keyword end]",
""
);
MT("indent_after_if_begin_next_line",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword begin]",
" [keyword break];",
" [keyword break];",
" [keyword end]",
""
);
MT("indent_single_statement_if_else",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword break];",
"[keyword else]",
" [keyword break];",
""
);
MT("indent_if_else_begin_same_line",
"[keyword if] [bracket (][variable foo][bracket )] [keyword begin]",
" [keyword break];",
" [keyword break];",
"[keyword end] [keyword else] [keyword begin]",
" [keyword break];",
" [keyword break];",
"[keyword end]",
""
);
MT("indent_if_else_begin_next_line",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword begin]",
" [keyword break];",
" [keyword break];",
" [keyword end]",
"[keyword else]",
" [keyword begin]",
" [keyword break];",
" [keyword break];",
" [keyword end]",
""
);
MT("indent_if_nested_without_begin",
"[keyword if] [bracket (][variable foo][bracket )]",
" [keyword if] [bracket (][variable foo][bracket )]",
" [keyword if] [bracket (][variable foo][bracket )]",
" [keyword break];",
""
);
MT("indent_case",
"[keyword case] [bracket (][variable state][bracket )]",
" [variable FOO]:",
" [keyword break];",
" [variable BAR]:",
" [keyword break];",
"[keyword endcase]",
""
);
MT("unindent_after_end_with_preceding_text",
"[keyword begin]",
" [keyword break]; [keyword end]",
""
);
MT("export_function_one_line_does_not_indent",
"[keyword export] [string \"DPI-C\"] [keyword function] [variable helloFromSV];",
""
);
MT("export_task_one_line_does_not_indent",
"[keyword export] [string \"DPI-C\"] [keyword task] [variable helloFromSV];",
""
);
MT("export_function_two_lines_indents_properly",
"[keyword export]",
" [string \"DPI-C\"] [keyword function] [variable helloFromSV];",
""
);
MT("export_task_two_lines_indents_properly",
"[keyword export]",
" [string \"DPI-C\"] [keyword task] [variable helloFromSV];",
""
);
MT("import_function_one_line_does_not_indent",
"[keyword import] [string \"DPI-C\"] [keyword function] [variable helloFromC];",
""
);
MT("import_task_one_line_does_not_indent",
"[keyword import] [string \"DPI-C\"] [keyword task] [variable helloFromC];",
""
);
MT("import_package_single_line_does_not_indent",
"[keyword import] [variable p]::[variable x];",
"[keyword import] [variable p]::[variable y];",
""
);
MT("covergroup_with_function_indents_properly",
"[keyword covergroup] [variable cg] [keyword with] [keyword function] [variable sample][bracket (][keyword bit] [variable b][bracket )];",
" [variable c] : [keyword coverpoint] [variable c];",
"[keyword endgroup]: [variable cg]",
""
);
})();
xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/powershell/test.js 0000644 00000005517 15114323006 0030534 0 ustar 00 home // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "powershell");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('comment', '[number 1][comment # A]');
MT('comment_multiline', '[number 1][comment <#]',
'[comment ABC]',
'[comment #>][number 2]');
[
'0', '1234',
'12kb', '12mb', '12Gb', '12Tb', '12PB', '12L', '12D', '12lkb', '12dtb',
'1.234', '1.234e56', '1.', '1.e2', '.2', '.2e34',
'1.2MB', '1.kb', '.1dTB', '1.e1gb', '.2', '.2e34',
'0x1', '0xabcdef', '0x3tb', '0xelmb'
].forEach(function(number) {
MT("number_" + number, "[number " + number + "]");
});
MT('string_literal_escaping', "[string 'a''']");
MT('string_literal_variable', "[string 'a $x']");
MT('string_escaping_1', '[string "a `""]');
MT('string_escaping_2', '[string "a """]');
MT('string_variable_escaping', '[string "a `$x"]');
MT('string_variable', '[string "a ][variable-2 $x][string b"]');
MT('string_variable_spaces', '[string "a ][variable-2 ${x y}][string b"]');
MT('string_expression', '[string "a ][punctuation jQuery(][variable-2 $x][operator +][number 3][punctuation )][string b"]');
MT('string_expression_nested', '[string "A][punctuation jQuery(][string "a][punctuation jQuery(][string "w"][punctuation )][string b"][punctuation )][string B"]');
MT('string_heredoc', '[string @"]',
'[string abc]',
'[string "@]');
MT('string_heredoc_quotes', '[string @"]',
'[string abc "\']',
'[string "@]');
MT('string_heredoc_variable', '[string @"]',
'[string a ][variable-2 $x][string b]',
'[string "@]');
MT('string_heredoc_nested_string', '[string @"]',
'[string a][punctuation jQuery(][string "w"][punctuation )][string b]',
'[string "@]');
MT('string_heredoc_literal_quotes', "[string @']",
'[string abc "\']',
"[string '@]");
MT('array', "[punctuation @(][string 'a'][punctuation ,][string 'b'][punctuation )]");
MT('hash', "[punctuation @{][string 'key'][operator :][string 'value'][punctuation }]");
MT('variable', "[variable-2 $test]");
MT('variable_global', "[variable-2 $global:test]");
MT('variable_spaces', "[variable-2 ${test test}]");
MT('operator_splat', "[variable-2 @x]");
MT('variable_builtin', "[builtin $ErrorActionPreference]");
MT('variable_builtin_symbols', "[builtin $$]");
MT('operator', "[operator +]");
MT('operator_unary', "[operator +][number 3]");
MT('operator_long', "[operator -match]");
[
'(', ')', '[[', ']]', '{', '}', ',', '`', ';', '.'
].forEach(function(punctuation) {
MT("punctuation_" + punctuation.replace(/^[\[\]]/,''), "[punctuation " + punctuation + "]");
});
MT('keyword', "[keyword if]");
MT('call_builtin', "[builtin Get-ChildItem]");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/shell/test.js 0000644 00000003366 15114330372 0027542 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({}, "shell");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("var",
"text [def $var] text");
MT("varBraces",
"text[def ${var}]text");
MT("varVar",
"text [def $a$b] text");
MT("varBracesVarBraces",
"text[def ${a}${b}]text");
MT("singleQuotedVar",
"[string 'text $var text']");
MT("singleQuotedVarBraces",
"[string 'text ${var} text']");
MT("doubleQuotedVar",
'[string "text ][def $var][string text"]');
MT("doubleQuotedVarBraces",
'[string "text][def ${var}][string text"]');
MT("doubleQuotedVarPunct",
'[string "text ][def $@][string text"]');
MT("doubleQuotedVarVar",
'[string "][def $a$b][string "]');
MT("doubleQuotedVarBracesVarBraces",
'[string "][def ${a}${b}][string "]');
MT("notAString",
"text\\'text");
MT("escapes",
"outside\\'\\\"\\`\\\\[string \"inside\\`\\'\\\"\\\\`\\$notAVar\"]outside\\$\\(notASubShell\\)");
MT("subshell",
"[builtin echo] [quote jQuery(whoami)] s log, stardate [quote `date`].");
MT("doubleQuotedSubshell",
"[builtin echo] [string \"][quote jQuery(whoami)][string 's log, stardate `date`.\"]");
MT("hashbang",
"[meta #!/bin/bash]");
MT("comment",
"text [comment # Blurb]");
MT("numbers",
"[number 0] [number 1] [number 2]");
MT("keywords",
"[keyword while] [atom true]; [keyword do]",
" [builtin sleep] [number 3]",
"[keyword done]");
MT("options",
"[builtin ls] [attribute -l] [attribute --human-readable]");
MT("operator",
"[def var][operator =]value");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/xquery/test.js 0000644 00000011764 15114330667 0030000 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Don't take these too seriously -- the expected results appear to be
// based on the results of actual runs without any serious manual
// verification. If a change you made causes them to fail, the test is
// as likely to wrong as the code.
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "xquery");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("eviltest",
"[keyword xquery] [keyword version] [variable "1][keyword .][atom 0][keyword -][variable ml"][def&variable ;] [comment (: this is : a \"comment\" :)]",
" [keyword let] [variable $let] [keyword :=] [variable <x] [variable attr][keyword =][variable "value">"test"<func>][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable <][keyword /][variable func><][keyword /][variable x>]",
" [keyword let] [variable $joe][keyword :=][atom 1]",
" [keyword return] [keyword element] [variable element] {",
" [keyword attribute] [variable attribute] { [atom 1] },",
" [keyword element] [variable test] { [variable 'a'] }, [keyword attribute] [variable foo] { [variable "bar"] },",
" [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],",
" [keyword //][variable x] } [comment (: a more 'evil' test :)]",
" [comment (: Modified Blakeley example (: with nested comment :) ... :)]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:declare]() {()}[variable ;]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:private]() {()}[variable ;]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:function]() {()}[variable ;]",
" [keyword declare] [keyword private] [keyword function] [def&variable local:local]() {()}[variable ;]",
" [keyword let] [variable $let] [keyword :=] [variable <let>let] [variable $let] [keyword :=] [variable "let"<][keyword /let][variable >]",
" [keyword return] [keyword element] [variable element] {",
" [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },",
" [keyword attribute] [variable fn:doc] { [variable "bar"] [variable castable] [keyword as] [atom xs:string] },",
" [keyword element] [variable text] { [keyword text] { [variable "text"] } },",
" [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],",
" [keyword //][variable fn:doc]",
" }");
MT("testEmptySequenceKeyword",
"[string \"foo\"] [keyword instance] [keyword of] [keyword empty-sequence]()");
MT("testMultiAttr",
"[tag <p ][attribute a1]=[string \"foo\"] [attribute a2]=[string \"bar\"][tag >][variable hello] [variable world][tag </p>]");
MT("test namespaced variable",
"[keyword declare] [keyword namespace] [variable e] [keyword =] [string \"http://example.com/ANamespace\"][variable ;declare] [keyword variable] [variable $e:exampleComThisVarIsNotRecognized] [keyword as] [keyword element]([keyword *]) [variable external;]");
MT("test EQName variable",
"[keyword declare] [keyword variable] [variable $\"http://www.example.com/ns/my\":var] [keyword :=] [atom 12][variable ;]",
"[tag <out>]{[variable $\"http://www.example.com/ns/my\":var]}[tag </out>]");
MT("test EQName function",
"[keyword declare] [keyword function] [def&variable \"http://www.example.com/ns/my\":fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {",
" [variable $a] [keyword +] [atom 2]",
"}[variable ;]",
"[tag <out>]{[def&variable \"http://www.example.com/ns/my\":fn]([atom 12])}[tag </out>]");
MT("test EQName function with single quotes",
"[keyword declare] [keyword function] [def&variable 'http://www.example.com/ns/my':fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {",
" [variable $a] [keyword +] [atom 2]",
"}[variable ;]",
"[tag <out>]{[def&variable 'http://www.example.com/ns/my':fn]([atom 12])}[tag </out>]");
MT("testProcessingInstructions",
"[def&variable data]([comment&meta <?target content?>]) [keyword instance] [keyword of] [atom xs:string]");
MT("testQuoteEscapeDouble",
"[keyword let] [variable $rootfolder] [keyword :=] [string \"c:\\builds\\winnt\\HEAD\\qa\\scripts\\\"]",
"[keyword let] [variable $keysfolder] [keyword :=] [def&variable concat]([variable $rootfolder], [string \"keys\\\"])");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/haml/test.js 0000644 00000005702 15114331332 0027345 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "haml");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Requires at least one media query
MT("elementName",
"[tag %h1] Hey There");
MT("oneElementPerLine",
"[tag %h1] Hey There %h2");
MT("idSelector",
"[tag %h1][attribute #test] Hey There");
MT("classSelector",
"[tag %h1][attribute .hello] Hey There");
MT("docType",
"[tag !!! XML]");
MT("comment",
"[comment / Hello WORLD]");
MT("notComment",
"[tag %h1] This is not a / comment ");
MT("attributes",
"[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}");
MT("htmlCode",
"[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket </][tag h1][tag&bracket >]");
MT("rubyBlock",
"[operator =][variable-2 @item]");
MT("selectorRubyBlock",
"[tag %a.selector=] [variable-2 @item]");
MT("nestedRubyBlock",
"[tag %a]",
" [operator =][variable puts] [string \"test\"]");
MT("multilinePlaintext",
"[tag %p]",
" Hello,",
" World");
MT("multilineRuby",
"[tag %p]",
" [comment -# this is a comment]",
" [comment and this is a comment too]",
" Date/Time",
" [operator -] [variable now] [operator =] [tag DateTime][operator .][property now]",
" [tag %strong=] [variable now]",
" [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])",
" [operator =][string \"Happy\"]",
" [operator =][string \"Belated\"]",
" [operator =][string \"Birthday\"]");
MT("multilineComment",
"[comment /]",
" [comment Multiline]",
" [comment Comment]");
MT("hamlComment",
"[comment -# this is a comment]");
MT("multilineHamlComment",
"[comment -# this is a comment]",
" [comment and this is a comment too]");
MT("multilineHTMLComment",
"[comment <!--]",
" [comment what a comment]",
" [comment -->]");
MT("hamlAfterRubyTag",
"[attribute .block]",
" [tag %strong=] [variable now]",
" [attribute .test]",
" [operator =][variable now]",
" [attribute .right]");
MT("stretchedRuby",
"[operator =] [variable puts] [string \"Hello\"],",
" [string \"World\"]");
MT("interpolationInHashAttribute",
//"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
MT("interpolationInHTMLAttribute",
"[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/dylan/test.js 0000644 00000005262 15114332416 0027540 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "dylan");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('comments',
'[comment // This is a line comment]',
'[comment /* This is a block comment */]',
'[comment /* This is a multi]',
'[comment line comment]',
'[comment */]',
'[comment /* And this is a /*]',
'[comment /* nested */ comment */]');
MT('unary_operators',
'[operator -][variable a]',
'[operator -] [variable a]',
'[operator ~][variable a]',
'[operator ~] [variable a]');
MT('binary_operators',
'[variable a] [operator +] [variable b]',
'[variable a] [operator -] [variable b]',
'[variable a] [operator *] [variable b]',
'[variable a] [operator /] [variable b]',
'[variable a] [operator ^] [variable b]',
'[variable a] [operator =] [variable b]',
'[variable a] [operator ==] [variable b]',
'[variable a] [operator ~=] [variable b]',
'[variable a] [operator ~==] [variable b]',
'[variable a] [operator <] [variable b]',
'[variable a] [operator <=] [variable b]',
'[variable a] [operator >] [variable b]',
'[variable a] [operator >=] [variable b]',
'[variable a] [operator &] [variable b]',
'[variable a] [operator |] [variable b]',
'[variable a] [operator :=] [variable b]');
MT('integers',
'[number 1]',
'[number 123]',
'[number -123]',
'[number +456]',
'[number #b010]',
'[number #o073]',
'[number #xabcDEF123]');
MT('floats',
'[number .3]',
'[number -1.]',
'[number -2.335]',
'[number +3.78d1]',
'[number 3.78s-1]',
'[number -3.32e+5]');
MT('characters_and_strings',
"[string 'a']",
"[string '\\\\'']",
'[string ""]',
'[string "a"]',
'[string "abc def"]',
'[string "More escaped characters: \\\\\\\\ \\\\a \\\\b \\\\e \\\\f \\\\n \\\\r \\\\t \\\\0 ..."]');
MT('brackets',
'[bracket #[[]]]',
'[bracket #()]',
'[bracket #(][number 1][bracket )]',
'[bracket [[][number 1][punctuation ,] [number 3][bracket ]]]',
'[bracket ()]',
'[bracket {}]',
'[keyword if] [bracket (][variable foo][bracket )]',
'[bracket (][number 1][bracket )]',
'[bracket [[][number 1][bracket ]]]');
MT('hash_words',
'[punctuation ##]',
'[atom #f]', '[atom #F]',
'[atom #t]', '[atom #T]',
'[atom #all-keys]',
'[atom #include]',
'[atom #key]',
'[atom #next]',
'[atom #rest]',
'[string #"foo"]',
'[error #invalid]');
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/slim/test.js 0000644 00000006072 15114332616 0027377 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Slim Highlighting for CodeMirror copyright (c) HicknHack Software Gmbh
(function() {
var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "slim");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Requires at least one media query
MT("elementName",
"[tag h1] Hey There");
MT("oneElementPerLine",
"[tag h1] Hey There .h2");
MT("idShortcut",
"[attribute&def #test] Hey There");
MT("tagWithIdShortcuts",
"[tag h1][attribute&def #test] Hey There");
MT("classShortcut",
"[attribute&qualifier .hello] Hey There");
MT("tagWithIdAndClassShortcuts",
"[tag h1][attribute&def #test][attribute&qualifier .hello] Hey There");
MT("docType",
"[keyword doctype] xml");
MT("comment",
"[comment / Hello WORLD]");
MT("notComment",
"[tag h1] This is not a / comment ");
MT("attributes",
"[tag a]([attribute title]=[string \"test\"]) [attribute href]=[string \"link\"]}");
MT("multiLineAttributes",
"[tag a]([attribute title]=[string \"test\"]",
" ) [attribute href]=[string \"link\"]}");
MT("htmlCode",
"[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket </][tag h1][tag&bracket >]");
MT("rubyBlock",
"[operator&special =][variable-2 @item]");
MT("selectorRubyBlock",
"[tag a][attribute&qualifier .test][operator&special =] [variable-2 @item]");
MT("nestedRubyBlock",
"[tag a]",
" [operator&special =][variable puts] [string \"test\"]");
MT("multilinePlaintext",
"[tag p]",
" | Hello,",
" World");
MT("multilineRuby",
"[tag p]",
" [comment /# this is a comment]",
" [comment and this is a comment too]",
" | Date/Time",
" [operator&special -] [variable now] [operator =] [tag DateTime][operator .][property now]",
" [tag strong][operator&special =] [variable now]",
" [operator&special -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])",
" [operator&special =][string \"Happy\"]",
" [operator&special =][string \"Belated\"]",
" [operator&special =][string \"Birthday\"]");
MT("multilineComment",
"[comment /]",
" [comment Multiline]",
" [comment Comment]");
MT("hamlAfterRubyTag",
"[attribute&qualifier .block]",
" [tag strong][operator&special =] [variable now]",
" [attribute&qualifier .test]",
" [operator&special =][variable now]",
" [attribute&qualifier .right]");
MT("stretchedRuby",
"[operator&special =] [variable puts] [string \"Hello\"],",
" [string \"World\"]");
MT("interpolationInHashAttribute",
"[tag div]{[attribute id] = [string \"]#{[variable test]}[string _]#{[variable ting]}[string \"]} test");
MT("interpolationInHTMLAttribute",
"[tag div]([attribute title]=[string \"]#{[variable test]}[string _]#{[variable ting]()}[string \"]) Test");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/stex/test.js 0000644 00000006042 15114336535 0027417 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "stex");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("word",
"foo");
MT("twoWords",
"foo bar");
MT("beginEndDocument",
"[tag \\begin][bracket {][atom document][bracket }]",
"[tag \\end][bracket {][atom document][bracket }]");
MT("beginEndEquation",
"[tag \\begin][bracket {][atom equation][bracket }]",
" E=mc^2",
"[tag \\end][bracket {][atom equation][bracket }]");
MT("beginModule",
"[tag \\begin][bracket {][atom module][bracket }[[]]]");
MT("beginModuleId",
"[tag \\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]");
MT("importModule",
"[tag \\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]");
MT("importModulePath",
"[tag \\importmodule][bracket [[][tag \\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]");
MT("psForPDF",
"[tag \\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]");
MT("comment",
"[comment % foo]");
MT("tagComment",
"[tag \\item][comment % bar]");
MT("commentTag",
" [comment % \\item]");
MT("commentLineBreak",
"[comment %]",
"foo");
MT("tagErrorCurly",
"[tag \\begin][error }][bracket {]");
MT("tagErrorSquare",
"[tag \\item][error ]]][bracket {]");
MT("commentCurly",
"[comment % }]");
MT("tagHash",
"the [tag \\#] key");
MT("tagNumber",
"a [tag \\$][atom 5] stetson");
MT("tagPercent",
"[atom 100][tag \\%] beef");
MT("tagAmpersand",
"L [tag \\&] N");
MT("tagUnderscore",
"foo[tag \\_]bar");
MT("tagBracketOpen",
"[tag \\emph][bracket {][tag \\{][bracket }]");
MT("tagBracketClose",
"[tag \\emph][bracket {][tag \\}][bracket }]");
MT("tagLetterNumber",
"section [tag \\S][atom 1]");
MT("textTagNumber",
"para [tag \\P][atom 2]");
MT("thinspace",
"x[tag \\,]y");
MT("thickspace",
"x[tag \\;]y");
MT("negativeThinspace",
"x[tag \\!]y");
MT("periodNotSentence",
"J.\\ L.\\ is");
MT("periodSentence",
"X[tag \\@]. The");
MT("italicCorrection",
"[bracket {][tag \\em] If[tag \\/][bracket }] I");
MT("tagBracket",
"[tag \\newcommand][bracket {][tag \\pop][bracket }]");
MT("inlineMathTagFollowedByNumber",
"[keyword $][tag \\pi][number 2][keyword $]");
MT("inlineMath",
"[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword $] other text");
MT("displayMath",
"More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text");
MT("mathWithComment",
"[keyword $][variable-2 x] [comment % $]",
"[variable-2 y][keyword $] other text");
MT("lineBreakArgument",
"[tag \\\\][bracket [[][atom 1cm][bracket ]]]");
})();
xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/javascript/test.js 0000644 00000017221 15114336635 0030525 0 ustar 00 home // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("locals",
"[keyword function] [def foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }");
MT("comma-and-binop",
"[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }");
MT("destructuring",
"([keyword function]([def a], [[[def b], [def c] ]]) {",
" [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);",
" [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];",
"})();");
MT("destructure_trailing_comma",
"[keyword let] {[def a], [def b],} [operator =] [variable foo];",
"[keyword let] [def c];"); // Parser still in good state?
MT("class_body",
"[keyword class] [def Foo] {",
" [property constructor]() {}",
" [property sayName]() {",
" [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];",
" }",
"}");
MT("class",
"[keyword class] [def Point] [keyword extends] [variable SuperThing] {",
" [property get] [property prop]() { [keyword return] [number 24]; }",
" [property constructor]([def x], [def y]) {",
" [keyword super]([string 'something']);",
" [keyword this].[property x] [operator =] [variable-2 x];",
" }",
"}");
MT("import",
"[keyword function] [def foo]() {",
" [keyword import] [def $] [keyword from] [string 'jquery'];",
" [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
"}");
MT("import_trailing_comma",
"[keyword import] {[def foo], [def bar],} [keyword from] [string 'baz']")
MT("const",
"[keyword function] [def f]() {",
" [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];",
"}");
MT("for/of",
"[keyword for]([keyword let] [def of] [keyword of] [variable something]) {}");
MT("generator",
"[keyword function*] [def repeat]([def n]) {",
" [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])",
" [keyword yield] [variable-2 i];",
"}");
MT("quotedStringAddition",
"[keyword let] [def f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];");
MT("quotedFatArrow",
"[keyword let] [def f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];");
MT("fatArrow",
"[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);",
"[variable a];", // No longer in scope
"[keyword let] [def f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];",
"[variable c];");
MT("spread",
"[keyword function] [def f]([def a], [meta ...][def b]) {",
" [variable something]([variable-2 a], [meta ...][variable-2 b]);",
"}");
MT("quasi",
"[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
MT("quasi_no_function",
"[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
MT("indent_statement",
"[keyword var] [def x] [operator =] [number 10]",
"[variable x] [operator +=] [variable y] [operator +]",
" [atom Infinity]",
"[keyword debugger];");
MT("indent_if",
"[keyword if] ([number 1])",
" [keyword break];",
"[keyword else] [keyword if] ([number 2])",
" [keyword continue];",
"[keyword else]",
" [number 10];",
"[keyword if] ([number 1]) {",
" [keyword break];",
"} [keyword else] [keyword if] ([number 2]) {",
" [keyword continue];",
"} [keyword else] {",
" [number 10];",
"}");
MT("indent_for",
"[keyword for] ([keyword var] [def i] [operator =] [number 0];",
" [variable i] [operator <] [number 100];",
" [variable i][operator ++])",
" [variable doSomething]([variable i]);",
"[keyword debugger];");
MT("indent_c_style",
"[keyword function] [def foo]()",
"{",
" [keyword debugger];",
"}");
MT("indent_else",
"[keyword for] (;;)",
" [keyword if] ([variable foo])",
" [keyword if] ([variable bar])",
" [number 1];",
" [keyword else]",
" [number 2];",
" [keyword else]",
" [number 3];");
MT("indent_funarg",
"[variable foo]([number 10000],",
" [keyword function]([def a]) {",
" [keyword debugger];",
"};");
MT("indent_below_if",
"[keyword for] (;;)",
" [keyword if] ([variable foo])",
" [number 1];",
"[number 2];");
MT("multilinestring",
"[keyword var] [def x] [operator =] [string 'foo\\]",
"[string bar'];");
MT("scary_regexp",
"[string-2 /foo[[/]]bar/];");
MT("indent_strange_array",
"[keyword var] [def x] [operator =] [[",
" [number 1],,",
" [number 2],",
"]];",
"[number 10];");
MT("param_default",
"[keyword function] [def foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {",
" [keyword return] [variable-2 x];",
"}");
MT("new_target",
"[keyword function] [def F]([def target]) {",
" [keyword if] ([variable-2 target] [operator &&] [keyword new].[keyword target].[property name]) {",
" [keyword return] [keyword new]",
" .[keyword target];",
" }",
"}");
var ts_mode = CodeMirror.getMode({indentUnit: 2}, "application/typescript")
function TS(name) {
test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1))
}
TS("extend_type",
"[keyword class] [def Foo] [keyword extends] [variable-3 Some][operator <][variable-3 Type][operator >] {}")
TS("arrow_type",
"[keyword let] [def x]: ([variable arg]: [variable-3 Type]) [operator =>] [variable-3 ReturnType]")
var jsonld_mode = CodeMirror.getMode(
{indentUnit: 2},
{name: "javascript", jsonld: true}
);
function LD(name) {
test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));
}
LD("json_ld_keywords",
'{',
' [meta "@context"]: {',
' [meta "@base"]: [string "http://example.com"],',
' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],',
' [property "likesFlavor"]: {',
' [meta "@container"]: [meta "@list"]',
' [meta "@reverse"]: [string "@beFavoriteOf"]',
' },',
' [property "nick"]: { [meta "@container"]: [meta "@set"] },',
' [property "nick"]: { [meta "@container"]: [meta "@index"] }',
' },',
' [meta "@graph"]: [[ {',
' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],',
' [property "name"]: [string "John Lennon"],',
' [property "modified"]: {',
' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],',
' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]',
' }',
' } ]]',
'}');
LD("json_ld_fake",
'{',
' [property "@fake"]: [string "@fake"],',
' [property "@contextual"]: [string "@identifier"],',
' [property "user@domain.com"]: [string "@graphical"],',
' [property "@ID"]: [string "@@ID"]',
'}');
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/xml/test.js 0000644 00000003336 15114412250 0033465 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml";
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); }
MT("matching",
"[tag&bracket <][tag top][tag&bracket >]",
" text",
" [tag&bracket <][tag inner][tag&bracket />]",
"[tag&bracket </][tag top][tag&bracket >]");
MT("nonmatching",
"[tag&bracket <][tag top][tag&bracket >]",
" [tag&bracket <][tag inner][tag&bracket />]",
" [tag&bracket </][tag&error tip][tag&bracket&error >]");
MT("doctype",
"[meta <!doctype foobar>]",
"[tag&bracket <][tag top][tag&bracket />]");
MT("cdata",
"[tag&bracket <][tag top][tag&bracket >]",
" [atom <![CDATA[foo]",
"[atom barbazguh]]]]>]",
"[tag&bracket </][tag top][tag&bracket >]");
// HTML tests
mode = CodeMirror.getMode({indentUnit: 2}, "text/html");
MT("selfclose",
"[tag&bracket <][tag html][tag&bracket >]",
" [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]",
"[tag&bracket </][tag html][tag&bracket >]");
MT("list",
"[tag&bracket <][tag ol][tag&bracket >]",
" [tag&bracket <][tag li][tag&bracket >]one",
" [tag&bracket <][tag li][tag&bracket >]two",
"[tag&bracket </][tag ol][tag&bracket >]");
MT("valueless",
"[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]");
MT("pThenArticle",
"[tag&bracket <][tag p][tag&bracket >]",
" foo",
"[tag&bracket <][tag article][tag&bracket >]bar");
})();
home/xbodynamge/crosstraining/wp-content/plugins/wp-file-manager/lib/codemirror/mode/clike/test.js 0000644 00000003617 15114447032 0027523 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-c");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("indent",
"[variable-3 void] [def foo]([variable-3 void*] [variable a], [variable-3 int] [variable b]) {",
" [variable-3 int] [variable c] [operator =] [variable b] [operator +]",
" [number 1];",
" [keyword return] [operator *][variable a];",
"}");
MT("indent_switch",
"[keyword switch] ([variable x]) {",
" [keyword case] [number 10]:",
" [keyword return] [number 20];",
" [keyword default]:",
" [variable printf]([string \"foo %c\"], [variable x]);",
"}");
MT("def",
"[variable-3 void] [def foo]() {}",
"[keyword struct] [def bar]{}",
"[variable-3 int] [variable-3 *][def baz]() {}");
MT("def_new_line",
"::[variable std]::[variable SomeTerribleType][operator <][variable T][operator >]",
"[def SomeLongMethodNameThatDoesntFitIntoOneLine]([keyword const] [variable MyType][operator &] [variable param]) {}")
MT("double_block",
"[keyword for] (;;)",
" [keyword for] (;;)",
" [variable x][operator ++];",
"[keyword return];");
MT("preprocessor",
"[meta #define FOO 3]",
"[variable-3 int] [variable foo];",
"[meta #define BAR\\]",
"[meta 4]",
"[variable-3 unsigned] [variable-3 int] [variable bar] [operator =] [number 8];",
"[meta #include <baz> ][comment // comment]")
var mode_cpp = CodeMirror.getMode({indentUnit: 2}, "text/x-c++src");
function MTCPP(name) { test.mode(name, mode_cpp, Array.prototype.slice.call(arguments, 1)); }
MTCPP("cpp14_literal",
"[number 10'000];",
"[number 0b10'000];",
"[number 0x10'000];",
"[string '100000'];");
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/javascript/test.js 0000644 00000017221 15114570117 0035040 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("locals",
"[keyword function] [def foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }");
MT("comma-and-binop",
"[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }");
MT("destructuring",
"([keyword function]([def a], [[[def b], [def c] ]]) {",
" [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);",
" [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];",
"})();");
MT("destructure_trailing_comma",
"[keyword let] {[def a], [def b],} [operator =] [variable foo];",
"[keyword let] [def c];"); // Parser still in good state?
MT("class_body",
"[keyword class] [def Foo] {",
" [property constructor]() {}",
" [property sayName]() {",
" [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];",
" }",
"}");
MT("class",
"[keyword class] [def Point] [keyword extends] [variable SuperThing] {",
" [property get] [property prop]() { [keyword return] [number 24]; }",
" [property constructor]([def x], [def y]) {",
" [keyword super]([string 'something']);",
" [keyword this].[property x] [operator =] [variable-2 x];",
" }",
"}");
MT("import",
"[keyword function] [def foo]() {",
" [keyword import] [def $] [keyword from] [string 'jquery'];",
" [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
"}");
MT("import_trailing_comma",
"[keyword import] {[def foo], [def bar],} [keyword from] [string 'baz']")
MT("const",
"[keyword function] [def f]() {",
" [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];",
"}");
MT("for/of",
"[keyword for]([keyword let] [def of] [keyword of] [variable something]) {}");
MT("generator",
"[keyword function*] [def repeat]([def n]) {",
" [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])",
" [keyword yield] [variable-2 i];",
"}");
MT("quotedStringAddition",
"[keyword let] [def f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];");
MT("quotedFatArrow",
"[keyword let] [def f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];");
MT("fatArrow",
"[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);",
"[variable a];", // No longer in scope
"[keyword let] [def f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];",
"[variable c];");
MT("spread",
"[keyword function] [def f]([def a], [meta ...][def b]) {",
" [variable something]([variable-2 a], [meta ...][variable-2 b]);",
"}");
MT("quasi",
"[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
MT("quasi_no_function",
"[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
MT("indent_statement",
"[keyword var] [def x] [operator =] [number 10]",
"[variable x] [operator +=] [variable y] [operator +]",
" [atom Infinity]",
"[keyword debugger];");
MT("indent_if",
"[keyword if] ([number 1])",
" [keyword break];",
"[keyword else] [keyword if] ([number 2])",
" [keyword continue];",
"[keyword else]",
" [number 10];",
"[keyword if] ([number 1]) {",
" [keyword break];",
"} [keyword else] [keyword if] ([number 2]) {",
" [keyword continue];",
"} [keyword else] {",
" [number 10];",
"}");
MT("indent_for",
"[keyword for] ([keyword var] [def i] [operator =] [number 0];",
" [variable i] [operator <] [number 100];",
" [variable i][operator ++])",
" [variable doSomething]([variable i]);",
"[keyword debugger];");
MT("indent_c_style",
"[keyword function] [def foo]()",
"{",
" [keyword debugger];",
"}");
MT("indent_else",
"[keyword for] (;;)",
" [keyword if] ([variable foo])",
" [keyword if] ([variable bar])",
" [number 1];",
" [keyword else]",
" [number 2];",
" [keyword else]",
" [number 3];");
MT("indent_funarg",
"[variable foo]([number 10000],",
" [keyword function]([def a]) {",
" [keyword debugger];",
"};");
MT("indent_below_if",
"[keyword for] (;;)",
" [keyword if] ([variable foo])",
" [number 1];",
"[number 2];");
MT("multilinestring",
"[keyword var] [def x] [operator =] [string 'foo\\]",
"[string bar'];");
MT("scary_regexp",
"[string-2 /foo[[/]]bar/];");
MT("indent_strange_array",
"[keyword var] [def x] [operator =] [[",
" [number 1],,",
" [number 2],",
"]];",
"[number 10];");
MT("param_default",
"[keyword function] [def foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {",
" [keyword return] [variable-2 x];",
"}");
MT("new_target",
"[keyword function] [def F]([def target]) {",
" [keyword if] ([variable-2 target] [operator &&] [keyword new].[keyword target].[property name]) {",
" [keyword return] [keyword new]",
" .[keyword target];",
" }",
"}");
var ts_mode = CodeMirror.getMode({indentUnit: 2}, "application/typescript")
function TS(name) {
test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1))
}
TS("extend_type",
"[keyword class] [def Foo] [keyword extends] [variable-3 Some][operator <][variable-3 Type][operator >] {}")
TS("arrow_type",
"[keyword let] [def x]: ([variable arg]: [variable-3 Type]) [operator =>] [variable-3 ReturnType]")
var jsonld_mode = CodeMirror.getMode(
{indentUnit: 2},
{name: "javascript", jsonld: true}
);
function LD(name) {
test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));
}
LD("json_ld_keywords",
'{',
' [meta "@context"]: {',
' [meta "@base"]: [string "http://example.com"],',
' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],',
' [property "likesFlavor"]: {',
' [meta "@container"]: [meta "@list"]',
' [meta "@reverse"]: [string "@beFavoriteOf"]',
' },',
' [property "nick"]: { [meta "@container"]: [meta "@set"] },',
' [property "nick"]: { [meta "@container"]: [meta "@index"] }',
' },',
' [meta "@graph"]: [[ {',
' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],',
' [property "name"]: [string "John Lennon"],',
' [property "modified"]: {',
' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],',
' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]',
' }',
' } ]]',
'}');
LD("json_ld_fake",
'{',
' [property "@fake"]: [string "@fake"],',
' [property "@contextual"]: [string "@identifier"],',
' [property "user@domain.com"]: [string "@graphical"],',
' [property "@ID"]: [string "@@ID"]',
'}');
})();
wp-content/plugins/file-manager-advanced/application/library/codemirror/mode/powershell/test.js 0000644 00000005473 15114570343 0035065 0 ustar 00 home/xbodynamge/crosstraining // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "powershell");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT('comment', '[number 1][comment # A]');
MT('comment_multiline', '[number 1][comment <#]',
'[comment ABC]',
'[comment #>][number 2]');
[
'0', '1234',
'12kb', '12mb', '12Gb', '12Tb', '12PB', '12L', '12D', '12lkb', '12dtb',
'1.234', '1.234e56', '1.', '1.e2', '.2', '.2e34',
'1.2MB', '1.kb', '.1dTB', '1.e1gb', '.2', '.2e34',
'0x1', '0xabcdef', '0x3tb', '0xelmb'
].forEach(function(number) {
MT("number_" + number, "[number " + number + "]");
});
MT('string_literal_escaping', "[string 'a''']");
MT('string_literal_variable', "[string 'a $x']");
MT('string_escaping_1', '[string "a `""]');
MT('string_escaping_2', '[string "a """]');
MT('string_variable_escaping', '[string "a `$x"]');
MT('string_variable', '[string "a ][variable-2 $x][string b"]');
MT('string_variable_spaces', '[string "a ][variable-2 ${x y}][string b"]');
MT('string_expression', '[string "a ][punctuation $(][variable-2 $x][operator +][number 3][punctuation )][string b"]');
MT('string_expression_nested', '[string "A][punctuation $(][string "a][punctuation $(][string "w"][punctuation )][string b"][punctuation )][string B"]');
MT('string_heredoc', '[string @"]',
'[string abc]',
'[string "@]');
MT('string_heredoc_quotes', '[string @"]',
'[string abc "\']',
'[string "@]');
MT('string_heredoc_variable', '[string @"]',
'[string a ][variable-2 $x][string b]',
'[string "@]');
MT('string_heredoc_nested_string', '[string @"]',
'[string a][punctuation $(][string "w"][punctuation )][string b]',
'[string "@]');
MT('string_heredoc_literal_quotes', "[string @']",
'[string abc "\']',
"[string '@]");
MT('array', "[punctuation @(][string 'a'][punctuation ,][string 'b'][punctuation )]");
MT('hash', "[punctuation @{][string 'key'][operator :][string 'value'][punctuation }]");
MT('variable', "[variable-2 $test]");
MT('variable_global', "[variable-2 $global:test]");
MT('variable_spaces', "[variable-2 ${test test}]");
MT('operator_splat', "[variable-2 @x]");
MT('variable_builtin', "[builtin $ErrorActionPreference]");
MT('variable_builtin_symbols', "[builtin $$]");
MT('operator', "[operator +]");
MT('operator_unary', "[operator +][number 3]");
MT('operator_long', "[operator -match]");
[
'(', ')', '[[', ']]', '{', '}', ',', '`', ';', '.'
].forEach(function(punctuation) {
MT("punctuation_" + punctuation.replace(/^[\[\]]/,''), "[punctuation " + punctuation + "]");
});
MT('keyword', "[keyword if]");
MT('call_builtin', "[builtin Get-ChildItem]");
})();