r92175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92174‎ | r92175 | r92176 >
Date:18:35, 14 July 2011
Author:brion
Status:ok
Tags:
Comment:
ParserPlayground: run a diff on round-trip output that mismatches in the CLI batch test.
Modified paths:
  • /trunk/extensions/ParserPlayground/tests/README (modified) (history)
  • /trunk/extensions/ParserPlayground/tests/roundtrip.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserPlayground/tests/roundtrip.js
@@ -1,4 +1,5 @@
22 var fs = require('fs'),
 3+ jsDiff = require('diff'),
34 DumpReader = require('./dumpReader.js').DumpReader;
45
56 // Fetch up some of our wacky parser bits...
@@ -39,6 +40,8 @@
4041 return true;
4142 } else {
4243 console.log('MISMATCH: ', msg);
 44+ var patch = jsDiff.createPatch('wikitext.txt', a, b, 'before', 'after');
 45+ console.log(patch);
4346 return false;
4447 }
4548 }
Index: trunk/extensions/ParserPlayground/tests/README
@@ -4,5 +4,6 @@
55
66 Need npm modules:
77 * jquery
8 -* libxmljs
 8+* diff
 9+* libxmljs (requires native compilation)
910

Status & tagging log