<commit_before>// Load in dependencies
var cp = require('child_process'),
    exec = cp.exec,
    chai = require('chai'),
    expect = chai.expect;

module.exports = {
  // Utilities
  'execute task': function (done) {
    // Relocate to test directory
    process.chdir(__dirname);

    // Execute the cmd and task combination
    var that = this;
    exec(this.cmd + this.task, function (err, stdout, stderr) {
      // Save results for later
      that.err = err;
      that.stdout = stdout;
      that.stderr = stderr;

      // Callback
      done();
    });
  },

  // Cleaning tasks
  'A clean test directory': [function () {
    this.cmd = 'grunt clean';
    this.task = '';
  }, 'execute task'],
  'is clean': function () {},

  // Grunt commands
  'grunt curl': function () {
    this.cmd = 'grunt curl:';
  },
  'grunt curl-dir': function () {
    this.cmd = 'grunt curl-dir:';
  },

  // curl tasks
  'downloading a js (utf16) file': [function () {
    this.task = 'js';
    this.filenames = [''];
  }, 'execute task'],
  'downloading a zip (binary) file': [function () {
    this.task = 'zip';
    this.filenames = [''];
  }, 'execute task'],
  'downloading a file from an invalid domain': [function () {
    this.task = 'nonExistingDomain';
    this.filenames = [''];
  }, 'execute task'],
  'downloading a nonexistant file': [function () {
    this.task = 'nonExistingFile';
    this.filenames = [''];
  }, 'execute task'],

  // curl-dir tasks
  'downloading multiple files': [function () {
    this.task = 'multi';
    this.filenames = [''];
  }, 'execute task'],
  'downloading brace expanded files':  [function () {
    this.task = 'braceExpansion';
    this.filenames = [''];
  }, 'execute task'],
  'using a custom router': [function () {
    this.task = 'router';
    this.filenames = [''];
  }, 'execute task'],

  // curl and curl-dir results
  'is successful':  function () {
    // Assert no warnings, good stdout, and file(s) match as expected
    console.log('www', this.err, this.stdout, this.stderr);
  },
  'throws an error':  function () {
    console.log('zzz', this.err);

  },<commit_msg>Adding file names to test against<commit_after>// Load in dependencies
var cp = require('child_process'),
    exec = cp.exec,
    chai = require('chai'),
    expect = chai.expect;

module.exports = {
  // Utilities
  'execute task': function (done) {
    // Relocate to test directory
    process.chdir(__dirname);

    // Execute the cmd and task combination
    var that = this;
    exec(this.cmd + this.task, function (err, stdout, stderr) {
      // Save results for later
      that.err = err;
      that.stdout = stdout;
      that.stderr = stderr;

      // Callback
      done();
    });
  },

  // Cleaning tasks
  'A clean test directory': [function () {
    this.cmd = 'grunt clean';
    this.task = '';
  }, 'execute task'],
  'is clean': function () {},

  // Grunt commands
  'grunt curl': function () {
    this.cmd = 'grunt curl:';
  },
  'grunt curl-dir': function () {
    this.cmd = 'grunt curl-dir:';
  },

  // curl tasks
  'downloading a js (utf16) file': [function () {
    this.task = 'js';
    this.filenames = ['file.js'];
  }, 'execute task'],
  'downloading a zip (binary) file': [function () {
    this.task = 'zip';
    this.filenames = ['file.zip'];
  }, 'execute task'],
  'downloading a file from an invalid domain': [function () {
    this.task = 'nonExistingDomain';
    this.filenames = ['nonexistent-domain'];
  }, 'execute task'],
  'downloading a nonexistant file': [function () {
    this.task = 'nonExistingFile';
    this.filenames = ['nonexistent-file'];
  }, 'execute task'],

  // curl-dir tasks
  'downloading multiple files': [function () {
    this.task = 'multi';
    this.filenames = ['multi/LAB.min.js', 'multi/cookiejar.js'];
  }, 'execute task'],
  'downloading brace expanded files':  [function () {
    this.task = 'braceExpansion';
    this.filenames = ['braceExpansion/LAB.min.js', 'braceExpansion/cookiejar.js'];
  }, 'execute task'],
  'using a custom router': [function () {
    this.task = 'router';
    this.filenames = ['router/ajax/libs/labjs/2.0.3/LAB.min.js', 'router/ajax/libs/cookiejar/0.5/cookiejar.js'];
  }, 'execute task'],

  // curl and curl-dir results
  'is successful':  function () {
    // Assert no error
    expect(this.err).to.be(null);

    // and file(s) match as expected
  },
  'throws an error':  function () {
    console.log('zzz', this.err);

  },
{'fraction_non_alphanumeric': 0.17331838565022423, 'fraction_numerical': 0.002017937219730942, 'mean_word_length': 2.777307366638442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '891979', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1451, 'n_words': 382}