Sha256: 4fc59c5c6c9d08e422cb65fda79a565d541653d9fc0f0359ccd6dc0ff1231863

Contents?: true

Size: 1.72 KB

Versions: 177

Compression:

Stored size: 1.72 KB

Contents

// 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");

})();

Version data entries

177 entries across 177 versions & 10 rubygems

Version Path
weaver-0.8.14 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.13 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.12 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.11 data/weaver/js/plugins/codemirror/mode/xml/test.js
jeygeethanmedia-inkpen-1.2.6.2 public/codemirror/mode/xml/test.js
jeygeethanmedia-inkpen-1.2.6.1 public/codemirror/mode/xml/test.js
templus_models-3.0.21 test/dummy/vendor/assets/javascripts/codemirror/mode/xml/test.js
weaver-0.8.10 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.9 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.8 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.7 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.6 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.2 data/weaver/js/plugins/codemirror/mode/xml/test.js
weaver-0.8.1 data/weaver/js/plugins/codemirror/mode/xml/test.js
templus_models-3.0.20 test/dummy/vendor/assets/javascripts/codemirror/mode/xml/test.js
templus_models-3.0.19 test/dummy/vendor/assets/javascripts/codemirror/mode/xml/test.js
templus_models-3.0.17 test/dummy/vendor/assets/javascripts/codemirror/mode/xml/test.js
stisla-rails-0.0.2 vendor/assets/modules/codemirror/mode/xml/test.js
lines-engine-1.2.6.1 public/codemirror/mode/xml/test.js
lines-engine-1.2.6 public/codemirror/mode/xml/test.js