diff options
author | Hugues Hiegel <root@paranoid> | 2015-03-11 16:55:04 +0100 |
---|---|---|
committer | Hugues Hiegel <root@paranoid> | 2015-03-11 16:55:04 +0100 |
commit | 99f904adcc37d93c90defcd8ce898598e25be212 (patch) | |
tree | 60a6c7b7b9cf012d6c0e8dcf5c7f4fe0a5b6fc49 /codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js | |
parent | b2034fdfec040a67988e543a911208ef2491ce7a (diff) |
Diffstat (limited to 'codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js')
-rw-r--r-- | codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js b/codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js new file mode 100644 index 0000000..9b75305 --- /dev/null +++ b/codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js @@ -0,0 +1,16 @@ +$(document).ready(function(){ + module("testProcessingInstructions"); + test("testProcessingInstructions", function() { + expect(1); + + var input = 'data(<?target content?>) instance of xs:string'; + var expected = '<span class="cm-variable cm-def">data</span>(<span class="cm-comment cm-meta"><?target content?></span>) <span class="cm-keyword">instance</span> <span class="cm-keyword">of</span> <span class="cm-atom">xs:string</span>'; + + $("#sandbox").html('<textarea id="editor">' + input + '</textarea>'); + var editor = CodeMirror.fromTextArea($("#editor")[0]); + var result = $(".CodeMirror-lines div div pre")[0].innerHTML; + + equal(result, expected); + $("#editor").html(""); + }); +}); |