summaryrefslogtreecommitdiff
path: root/codemirror_ui/lib/CodeMirror-2.3/mode/xquery/test/testProcessingInstructions.js
diff options
context:
space:
mode:
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.js16
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">&lt;?target content?&gt;</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("");
+ });
+});