MCPcopy Create free account
hub / github.com/creatale/node-dv / compareTextParagraph

Function compareTextParagraph

test/tesseract.test.js:16–22  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

14var faultyTextParagraph = 'mpdoraisingarticlegeneralnorlandmyhastily.itscompanionssayuncommonlypianofortefavourable.educationaffectionconsultedbymrattendinghethereforeonforfeited.highwaymorefarfeetkindevilplayled.sometimesfurnishedcollectedaddforresourcesattention.norlandanbyminuterenquireitgeneralontowardsforming.adaptedmrstotallycompanytwoyetconductmen.'
15
16var compareTextParagraph = function(text){
17 var plainText = text.replace(/\s/g, '').toLowerCase();
18 for (var i = 0; i < 6; ++i) {
19 var paragraph = plainText.substr(i * textParagraph.length, textParagraph.length);
20 paragraph.should.equal(i === 3 ? faultyTextParagraph : textParagraph, 'Paragraph ' + i);
21 }
22}
23
24var writeImageBoxes = function(basename, image, array){
25 //console.log(util.inspect(array, false, 100));

Callers 1

tesseract.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected