~ubuntu-branches/ubuntu/utopic/codemirror-js/utopic

« back to all changes in this revision

Viewing changes to mode/xquery/test/testEmptySequenceKeyword.js

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2012-04-12 12:25:28 UTC
  • Revision ID: package-import@ubuntu.com-20120412122528-8xp5a8frj4h1d3ee
Tags: upstream-2.23
ImportĀ upstreamĀ versionĀ 2.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$(document).ready(function(){
 
2
  module("testEmptySequenceKeyword");
 
3
  test("testEmptySequenceKeyword", function() {
 
4
    expect(1);
 
5
 
 
6
    var input = '"foo" instance of empty-sequence()';
 
7
    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>()';
 
8
 
 
9
    $("#sandbox").html('<textarea id="editor">' + input + '</textarea>');
 
10
    var editor = CodeMirror.fromTextArea($("#editor")[0]);
 
11
    var result = $(".CodeMirror-lines div div pre")[0].innerHTML;
 
12
 
 
13
     equal(result, expected);
 
14
     $("#editor").html("");
 
15
  });
 
16
});