From: sndrs Date: Thu, 13 Jun 2013 14:33:13 +0000 (+0100) Subject: tests for 6e5005ef7ed7c3dd9baf6ecc39c3ec1b2470b068 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=08aa3205d4bfa13d50cb41b3ced567aae819fbc3;p=html-minifier.git tests for 6e5005ef7ed7c3dd9baf6ecc39c3ec1b2470b068 --- diff --git a/tests/minifier.js b/tests/minifier.js index 5f65f35..444defb 100644 --- a/tests/minifier.js +++ b/tests/minifier.js @@ -76,6 +76,13 @@ test('space normalization around text', function(){ equal(minify('

blah

\n\n\n '), '

blah

'); + // tags from collapseWhitespaceSmart() + ['a', 'b', 'big', 'button', 'code', 'em', 'font', 'i', 'kbd', 'mark', 'q', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u'].forEach(function(el){ + equal(minify('

foo <'+el+'>baz bar

'), '

foo<'+el+'>baz bar

'); + equal(minify('

foo<'+el+'>bazbar

'), '

foo<'+el+'>bazbar

'); + }) + equal(minify('

foo bar

'), '

foo bar

'); + equal(minify('

foobar

'), '

foobar

'); }); test('doctype normalization', function() {