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