mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
9 years ago
7 changed files with 117 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||||
|
module.exports = { |
||||
|
description: 'indentation is preserved in multi-line strings' |
||||
|
}; |
@ -0,0 +1,20 @@ |
|||||
|
define(function () { 'use strict'; |
||||
|
|
||||
|
var a = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var b = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var c = `1
|
||||
|
2`;
|
||||
|
|
||||
|
var d = `1
|
||||
|
2`;
|
||||
|
|
||||
|
assert.equal( a, '1\n 2' ); |
||||
|
assert.equal( b, '1\n\t2' ); |
||||
|
assert.equal( c, '1\n 2' ); |
||||
|
assert.equal( d, '1\n\t2' ); |
||||
|
|
||||
|
}); |
@ -0,0 +1,18 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
var a = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var b = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var c = `1
|
||||
|
2`;
|
||||
|
|
||||
|
var d = `1
|
||||
|
2`;
|
||||
|
|
||||
|
assert.equal( a, '1\n 2' ); |
||||
|
assert.equal( b, '1\n\t2' ); |
||||
|
assert.equal( c, '1\n 2' ); |
||||
|
assert.equal( d, '1\n\t2' ); |
@ -0,0 +1,16 @@ |
|||||
|
var a = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var b = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var c = `1
|
||||
|
2`;
|
||||
|
|
||||
|
var d = `1
|
||||
|
2`;
|
||||
|
|
||||
|
assert.equal( a, '1\n 2' ); |
||||
|
assert.equal( b, '1\n\t2' ); |
||||
|
assert.equal( c, '1\n 2' ); |
||||
|
assert.equal( d, '1\n\t2' ); |
@ -0,0 +1,20 @@ |
|||||
|
(function () { 'use strict'; |
||||
|
|
||||
|
var a = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var b = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var c = `1
|
||||
|
2`;
|
||||
|
|
||||
|
var d = `1
|
||||
|
2`;
|
||||
|
|
||||
|
assert.equal( a, '1\n 2' ); |
||||
|
assert.equal( b, '1\n\t2' ); |
||||
|
assert.equal( c, '1\n 2' ); |
||||
|
assert.equal( d, '1\n\t2' ); |
||||
|
|
||||
|
})(); |
@ -0,0 +1,24 @@ |
|||||
|
(function (global, factory) { |
||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
||||
|
typeof define === 'function' && define.amd ? define(factory) : |
||||
|
factory(); |
||||
|
}(this, function () { 'use strict'; |
||||
|
|
||||
|
var a = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var b = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var c = `1
|
||||
|
2`;
|
||||
|
|
||||
|
var d = `1
|
||||
|
2`;
|
||||
|
|
||||
|
assert.equal( a, '1\n 2' ); |
||||
|
assert.equal( b, '1\n\t2' ); |
||||
|
assert.equal( c, '1\n 2' ); |
||||
|
assert.equal( d, '1\n\t2' ); |
||||
|
|
||||
|
})); |
@ -0,0 +1,16 @@ |
|||||
|
var a = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var b = '1\ |
||||
|
2'; |
||||
|
|
||||
|
var c = `1
|
||||
|
2`;
|
||||
|
|
||||
|
var d = `1
|
||||
|
2`;
|
||||
|
|
||||
|
assert.equal( a, '1\n 2' ); |
||||
|
assert.equal( b, '1\n\t2' ); |
||||
|
assert.equal( c, '1\n 2' ); |
||||
|
assert.equal( d, '1\n\t2' ); |
Loading…
Reference in new issue