<commit_before>var parseParams = require('../lib/utils').parseParams;

var path = require('path'),
    assert = require('assert'),
    inspect = require('util').inspect;

var group = path.basename(__filename, '.js') + '/';

[
  { source: 'text/plain; encoding=utf8',
    expected: ['text/plain', ['encoding', 'utf8']],
    what: 'Unquoted'
  },
  { source: 'text/plain; encoding=',
    expected: ['text/plain', ['encoding', '']],
    what: 'Unquoted empty string'
  },
  { source: 'text/plain; encoding="utf8"',
    expected: ['text/plain', ['encoding', 'utf8']],
    what: 'Quoted'
  },
  { source: 'text/plain; greeting="hello \\"world\\""',
    expected: ['text/plain', ['greeting', 'hello "world"']],
    what: 'Quotes within quoted'
  },
  { source: 'text/plain; encoding=""',
    expected: ['text/plain', ['encoding', '']],
    what: 'Quoted empty string'
  },
  { source: 'text/plain; encoding="utf8";\t   foo=bar;test',
    expected: ['text/plain', ['encoding', 'utf8'], ['foo', 'bar'], 'test'],
    what: 'Multiple params with various spacing'
  },
  { source: "text/plain; filename*=iso-8859-1'en'%A3%20rates",
    expected: ['text/plain', ['filename', '£ rates']],<commit_msg>test: add more parseParams tests<commit_after>var parseParams = require('../lib/utils').parseParams;

var path = require('path'),
    assert = require('assert'),
    inspect = require('util').inspect;

var group = path.basename(__filename, '.js') + '/';

[
  { source: 'video/ogg',
    expected: ['video/ogg'],
    what: 'No parameters'
  },
  { source: 'video/ogg;',
    expected: ['video/ogg'],
    what: 'No parameters (with separator)'
  },
  { source: 'video/ogg; ',
    expected: ['video/ogg'],
    what: 'No parameters (with separator followed by whitespace)'
  },
  { source: ';video/ogg',
    expected: ['', 'video/ogg'],
    what: 'Empty parameter'
  },
  { source: 'text/plain; encoding=utf8',
    expected: ['text/plain', ['encoding', 'utf8']],
    what: 'Unquoted'
  },
  { source: 'text/plain; encoding=',
    expected: ['text/plain', ['encoding', '']],
    what: 'Unquoted empty string'
  },
  { source: 'text/plain; encoding="utf8"',
    expected: ['text/plain', ['encoding', 'utf8']],
    what: 'Quoted'
  },
  { source: 'text/plain; greeting="hello \\"world\\""',
    expected: ['text/plain', ['greeting', 'hello "world"']],
    what: 'Quotes within quoted'
  },
  { source: 'text/plain; encoding=""',
    expected: ['text/plain', ['encoding', '']],
    what: 'Quoted empty string'
  },
  { source: 'text/plain; encoding="utf8";\t   foo=bar;test',
    expected: ['text/plain', ['encoding', 'utf8'], ['foo', 'bar'], 'test'],
    what: 'Multiple params with various spacing'
  },
  { source: "text/plain; filename*=iso-8859-1'en'%A3%20rates",
    expected: ['text/plain', ['filename', '£ rates']],
{'fraction_non_alphanumeric': 0.2275, 'fraction_numerical': 0.01, 'mean_word_length': 3.8968531468531467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5502799', 'n_tokens_mistral': 962, 'n_tokens_neox': 947, 'n_words': 218}