Sha256: ed745b752f9816a6670deb4aeb6f9dcde29c460ec2baaea8024729d6e0aa74d3

Contents?: true

Size: 1.72 KB

Versions: 20

Compression:

Stored size: 1.72 KB

Contents

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://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

20 entries across 20 versions & 2 rubygems

Version Path
hyde_admin-0.0.13 bin/mode/xml/test.js
wallaby-7.0.0.beta2 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-7.0.0.beta1 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.1.6 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
hyde_admin-0.0.11 bin/mode/xml/test.js
hyde_admin-0.0.10 bin/mode/xml/test.js
wallaby-6.1.5 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.1.4 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
hyde_admin-0.0.9 bin/mode/xml/test.js
hyde_admin-0.0.8 bin/mode/xml/test.js
hyde_admin-0.0.7 bin/mode/xml/test.js
hyde_admin-0.0.5 bin/mode/xml/test.js
hyde_admin-0.0.4 bin/mode/xml/test.js
hyde_admin-0.0.3 bin/mode/xml/test.js
wallaby-6.1.3 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.1.2 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.1.1 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.1.0 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.0.2 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js
wallaby-6.0.1 vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js