1 | var grunt = require('../../lib/grunt');
|
2 |
|
3 | exports['utils'] = {
|
4 | 'linefeed': function(test) {
|
5 | test.expect(1);
|
6 | if (process.platform === 'win32') {
|
7 | test.equal(grunt.utils.linefeed, '\r\n', 'linefeed should be operating-system appropriate.');
|
8 | } else {
|
9 | test.equal(grunt.utils.linefeed, '\n', 'linefeed should be operating-system appropriate.');
|
10 | }
|
11 | test.done();
|
12 | },
|
13 | 'normalizelf': function(test) {
|
14 | test.expect(1);
|
15 | if (process.platform === 'win32') {
|
16 | test.equal(grunt.utils.normalizelf('foo\nbar\r\nbaz\r\n\r\nqux\n\nquux'), 'foo\r\nbar\r\nbaz\r\n\r\nqux\r\n\r\nquux', 'linefeeds should be normalized');
|
17 | } else {
|
18 | test.equal(grunt.utils.normalizelf('foo\nbar\r\nbaz\r\n\r\nqux\n\nquux'), 'foo\nbar\nbaz\n\nqux\n\nquux', 'linefeeds should be normalized');
|
19 | }
|
20 | test.done();
|
21 | }
|
22 | };
|