Skip to content

Commit 949f7d5

Browse files
committed
add linebreak test case
1 parent 0b41089 commit 949f7d5

2 files changed

Lines changed: 39 additions & 12 deletions

File tree

package-lock.json

Lines changed: 33 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/ini.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,11 @@ describe('Ini', function() {
190190
const newIni2 = new Ini('[x]\nb=3')
191191
expect(newIni2.sections[0].lines.length).toBe(2)
192192
})
193+
194+
it('should determind linebreak by system when by text fail', () => {
195+
const newIni = new Ini('[x]=3')
196+
const linebreak = process.platform === 'win32' ? '\r\n' : '\n'
197+
expect(newIni.lineBreak).toBe(linebreak)
198+
})
193199
})
194200
});

0 commit comments

Comments
 (0)