本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.3KB

  1. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  2. // Distributed under an MIT license: https://codemirror.net/LICENSE
  3. (function() {
  4. var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "cypher");
  5. function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
  6. MT("unbalancedDoubledQuotedString",
  7. "[string \"a'b\"][variable c]");
  8. MT("unbalancedSingleQuotedString",
  9. "[string 'a\"b'][variable c]");
  10. MT("doubleQuotedString",
  11. "[string \"a\"][variable b]");
  12. MT("singleQuotedString",
  13. "[string 'a'][variable b]");
  14. MT("single attribute (with content)",
  15. "[node {][atom a:][string 'a'][node }]");
  16. MT("multiple attribute, singleQuotedString (with content)",
  17. "[node {][atom a:][string 'a'][node ,][atom b:][string 'b'][node }]");
  18. MT("multiple attribute, doubleQuotedString (with content)",
  19. "[node {][atom a:][string \"a\"][node ,][atom b:][string \"b\"][node }]");
  20. MT("single attribute (without content)",
  21. "[node {][atom a:][string 'a'][node }]");
  22. MT("multiple attribute, singleQuotedString (without content)",
  23. "[node {][atom a:][string ''][node ,][atom b:][string ''][node }]");
  24. MT("multiple attribute, doubleQuotedString (without content)",
  25. "[node {][atom a:][string \"\"][node ,][atom b:][string \"\"][node }]");
  26. })();
上海开阖软件有限公司 沪ICP备12045867号-1