Skip to content

Commit

Permalink
New line tests check \n
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepb committed Apr 20, 2014
1 parent aa1f1f0 commit 0184789
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions test/jade.test.js
Expand Up @@ -36,47 +36,31 @@ describe('jade', function(){
});

it('should support line endings', function(){
var str = [
var src = [
'p',
'div',
'img'
].join('\r\n');
];

var html = [
'<p></p>',
'<div></div>',
'<img/>'
].join('');

assert.equal(html, jade.render(str));
assert.equal(html, jade.render(src.join('\n')));
assert.equal(html, jade.render(src.join('\r')));
assert.equal(html, jade.render(src.join('\r\n')));

var str = [
'p',
'div',
'img'
].join('\r');

var html = [
'<p></p>',
'<div></div>',
'<img/>'
].join('');

assert.equal(html, jade.render(str));

var str = [
'p',
'div',
'img'
].join('\r\n');

var html = [
html = [
'<p></p>',
'<div></div>',
'<img>'
].join('');

assert.equal(html, jade.render(str, { doctype:'html' }));
assert.equal(html, jade.render(src.join('\n'), { doctype:'html' }));
assert.equal(html, jade.render(src.join('\r'), { doctype:'html' }));
assert.equal(html, jade.render(src.join('\r\n'), { doctype:'html' }));
});

it('should support single quotes', function(){
Expand Down

0 comments on commit 0184789

Please sign in to comment.