r92180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92179‎ | r92180 | r92181 >
Date:18:53, 14 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Updated annotation tests based on changes made that no longer required \n characters at the end of line objects, and automatically inserts them between line objects when being converted to content objects.
Modified paths:
  • /trunk/parsers/wikidom/tests/annotations/test.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/annotations/test.js
@@ -2,7 +2,7 @@
33
44 var lines = [
55 {
6 - "text": "This is a test paragraph!\n",
 6+ "text": "This is a test paragraph!",
77 "annotations": [
88 {
99 "type": "italic",
@@ -31,7 +31,7 @@
3232 ]
3333 },
3434 {
35 - "text": "Paragraphs can have more than one line.\n",
 35+ "text": "Paragraphs can have more than one line.",
3636 "annotations": [
3737 {
3838 "type": "italic",
@@ -65,7 +65,7 @@
6666 );
6767 equal(
6868 content.substring( 39 ),
69 - 'n have more than one line.\n',
 69+ 'n have more than one line.',
7070 'Uses data length if end is not given'
7171 );
7272 equal(
@@ -75,18 +75,18 @@
7676 );
7777 equal(
7878 content.substring( 39, 100000000000 ),
79 - 'n have more than one line.\n',
 79+ 'n have more than one line.',
8080 'Clamps out of range end arguments'
8181 );
8282 equal(
8383 content.substring(),
84 - 'This is a test paragraph!\nParagraphs can have more than one line.\n',
 84+ 'This is a test paragraph!\nParagraphs can have more than one line.',
8585 'Called without arguments returns all text'
8686 );
8787 } );
8888
8989 test( 'Content.getLength', function() {
90 - equals( content.getLength(), 66, 'Returns correct length' );
 90+ equals( content.getLength(), 65, 'Returns correct length' );
9191 } )
9292
9393 test( 'Content.slice', function() {
@@ -157,8 +157,7 @@
158158 "i",
159159 "n",
160160 "e",
161 - ".",
162 - "\n"
 161+ "."
163162 ],
164163 'Called without arguments returns all data'
165164 );

Status & tagging log