Index: trunk/parsers/wikidom/tests/annotations/test.js |
— | — | @@ -162,7 +162,10 @@ |
163 | 163 | equals( content.getLength(), 66 ); |
164 | 164 | } ); |
165 | 165 | |
166 | | -test( '', function() { |
167 | | - var data = content.slice().data; |
168 | | - deepEqual( data, [["T",{"type":"italic"}],["h",{"type":"italic"}],["i",{"type":"italic"}],["s",{"type":"italic"}]," ","i","s"," ",["a",{"type":"xlink","data":{"url":"http://www.a.com"}}],[" ",{"type":"xlink","data":{"url":"http://www.a.com"}}],["t",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}],["e",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}],["s",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}],["t",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}]," ","p","a","r","a","g","r","a","p","h","!","\u000a","P","a","r","a","g","r","a","p","h","s"," ",["c",{"type":"italic"}],["a",{"type":"italic"}],["n",{"type":"italic"}]," ","h","a","v","e"," ",["m",{"type":"bold"}],["o",{"type":"bold"}],["r",{"type":"bold"}],["e",{"type":"bold"}]," ","t","h","a","n"," ","o","n","e"," ","l","i","n","e",".","\u000a"] ); |
| 166 | +test( 'slice without arguments returns correct Content', function() { |
| 167 | + deepEqual( content.slice().data, [["T",{"type":"italic"}],["h",{"type":"italic"}],["i",{"type":"italic"}],["s",{"type":"italic"}]," ","i","s"," ",["a",{"type":"xlink","data":{"url":"http://www.a.com"}}],[" ",{"type":"xlink","data":{"url":"http://www.a.com"}}],["t",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}],["e",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}],["s",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}],["t",{"type":"xlink","data":{"url":"http://www.a.com"}},{"type":"bold"}]," ","p","a","r","a","g","r","a","p","h","!","\u000a","P","a","r","a","g","r","a","p","h","s"," ",["c",{"type":"italic"}],["a",{"type":"italic"}],["n",{"type":"italic"}]," ","h","a","v","e"," ",["m",{"type":"bold"}],["o",{"type":"bold"}],["r",{"type":"bold"}],["e",{"type":"bold"}]," ","t","h","a","n"," ","o","n","e"," ","l","i","n","e",".","\u000a"] ); |
| 168 | +} ); |
| 169 | + |
| 170 | +test( 'slice with arguments returns correct Content', function() { |
| 171 | + deepEqual( content.slice(3, 10).data, [["s",{"type":"italic"}]," ","i","s"," ",["a",{"type":"xlink","data":{"url":"http://www.a.com"}}],[" ",{"type":"xlink","data":{"url":"http://www.a.com"}}]] ); |
169 | 172 | } ); |
\ No newline at end of file |