http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99438
Revision: 99438
Author: tparscal
Date: 2011-10-10 22:02:24 +0000 (Mon, 10 Oct 2011)
Log Message:
-----------
Added test case for prepareInsertion, which currently fails since that function
is not complete yet.
Modified Paths:
--------------
trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js
Modified: trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js
===================================================================
--- trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js 2011-10-10
21:56:25 UTC (rev 99437)
+++ trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js 2011-10-10
22:02:24 UTC (rev 99438)
@@ -353,7 +353,16 @@
},
{ 'type': 'retain', 'length': 25 }
],
- 'prepareRemove includes the content being removed'
+ 'prepareRemoval includes the content being removed'
);
+
+ deepEqual(
+ documentModel.prepareInsertion( 1, ['d', 'e', 'f'] ),
+ [
+ { 'type': 'retain', 'length': 1 },
+ { 'type': 'insert', 'data': ['d', 'e', 'f'] },
+ { 'type': 'retain', 'length': 27 }
+ ],
+ 'prepareInsertion retains data up to the offset and includes
the content being inserted'
+ );
} );
-
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs