'use strict';

var grunt = require('grunt');

function readFile(file) {
  var contents = grunt.file.read(file);

  if (process.platform === 'win32') {
    contents = contents.replace(/\r\n/g, '\n');
  }

  return contents;
}

exports.accessibilityTests = {
  matchReports: function(test) {

    var actual;
    var expected;

    test.expect(2);

    actual = readFile('reports/txt/test.txt');
    expected = readFile('test/expected/txt/test.txt');
    test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');

    actual = readFile('reports/json/test.json');
    expected = readFile('test/expected/json/test.json');
    test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');

    // actual = readFile('reports/csv/test.csv');
    // expected = readFile('test/expected/csv/test.csv');
    // test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');

    test.done();
  }
};

'use strict';

var grunt = require('grunt');

exports.accessibilityTests = {
  matchReports: function(test) {

    var actual;
    var expected;

    test.expect(2);

    actual = grunt.file.read('reports/txt/test.txt');
    expected = grunt.file.read('test/expected/txt/test.txt');
    test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');

    actual = grunt.file.read('reports/json/test.json');
    expected = grunt.file.read('test/expected/json/test.json');
    test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');

    // actual = grunt.file.read('reports/csv/test.csv');
    // expected = grunt.file.read('test/expected/csv/test.csv');
    // test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');

    test.done();
  }
};

--- 
+++ 
@@ -1,6 +1,16 @@
 'use strict';
 
 var grunt = require('grunt');
+
+function readFile(file) {
+  var contents = grunt.file.read(file);
+
+  if (process.platform === 'win32') {
+    contents = contents.replace(/\r\n/g, '\n');
+  }
+
+  return contents;
+}
 
 exports.accessibilityTests = {
   matchReports: function(test) {
@@ -10,16 +20,16 @@
 
     test.expect(2);
 
-    actual = grunt.file.read('reports/txt/test.txt');
-    expected = grunt.file.read('test/expected/txt/test.txt');
+    actual = readFile('reports/txt/test.txt');
+    expected = readFile('test/expected/txt/test.txt');
     test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');
 
-    actual = grunt.file.read('reports/json/test.json');
-    expected = grunt.file.read('test/expected/json/test.json');
+    actual = readFile('reports/json/test.json');
+    expected = readFile('test/expected/json/test.json');
     test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');
 
-    // actual = grunt.file.read('reports/csv/test.csv');
-    // expected = grunt.file.read('test/expected/csv/test.csv');
+    // actual = readFile('reports/csv/test.csv');
+    // expected = readFile('test/expected/csv/test.csv');
     // test.equal(actual, expected, 'Should produce a default report without DOM element for a test file');
 
     test.done();
Fix tests on Windows with autocrlf on.
