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.

37 lines
1.3 KiB

2 months ago
  1. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  2. // Distributed under an MIT license: https://codemirror.net/5/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. })();