aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/xquery/test/testEmptySequenceKeyword.js
blob: 39ed090500ca80177fcefb825716cfa4f91d0310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$(document).ready(function(){
  module("testEmptySequenceKeyword");
  test("testEmptySequenceKeyword", function() {
    expect(1);

    var input = '"foo" instance of empty-sequence()';
    var expected = '<span class="cm-string">"foo"</span> <span class="cm-keyword">instance</span> <span class="cm-keyword">of</span> <span class="cm-keyword">empty-sequence</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("");
  });
});