From 5ed2e78e6dfe7344d3d4bf80b92f82d64f9f8239 Mon Sep 17 00:00:00 2001 From: Adrian Heine <mail@adrianheine.de> Date: Mon, 24 Jul 2017 10:44:33 +0200 Subject: [PATCH] [d mode] Add test for nested comments See #4872. --- mode/d/test.js | 11 +++++++++++ test/index.html | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 mode/d/test.js diff --git a/mode/d/test.js b/mode/d/test.js new file mode 100644 index 000000000..d8de4ad35 --- /dev/null +++ b/mode/d/test.js @@ -0,0 +1,11 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "d"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("nested_comments", + "[comment /+]","[comment comment]","[comment +/]","[variable void] [variable main](){}"); + +})(); diff --git a/test/index.html b/test/index.html index 4146a4d45..99bee5bb9 100644 --- a/test/index.html +++ b/test/index.html @@ -21,6 +21,7 @@ <script src="../mode/clike/clike.js"></script> <!-- clike must be after css or vim and sublime tests will fail --> <script src="../mode/cypher/cypher.js"></script> +<script src="../mode/d/d.js"></script> <script src="../mode/gfm/gfm.js"></script> <script src="../mode/haml/haml.js"></script> <script src="../mode/htmlmixed/htmlmixed.js"></script> @@ -115,6 +116,7 @@ <script src="../mode/css/scss_test.js"></script> <script src="../mode/css/less_test.js"></script> <script src="../mode/cypher/test.js"></script> + <script src="../mode/d/test.js"></script> <script src="../mode/gfm/test.js"></script> <script src="../mode/haml/test.js"></script> <script src="../mode/javascript/test.js"></script> -- GitLab