<commit_before>/*global describe, it*/

'use strict';


var assert  = require('assert');
var fs      = require('fs');

var SvgPath = require('../');


describe('Parse', function () {

  it('big batch', function () {
    var batch = fs.readFileSync(__dirname +'/fixtures/big.txt', 'utf8').split(/[\r\n]/);

    for (var i=0; i<batch.length; i++) {
      if (!batch[i]) { continue; }
      assert.equal(batch[i], new SvgPath(batch[i]).toString());
    }
  });


  it('empty string', function () {
    assert.equal('', new SvgPath('').toString());
  });

});<commit_msg>more formats testing<commit_after>/*global describe, it*/

'use strict';


var assert  = require('assert');
var fs      = require('fs');

var SvgPath = require('../');


describe('Parse', function () {

  it('big batch', function () {
    var batch = fs.readFileSync(__dirname +'/fixtures/big.txt', 'utf8').split(/[\r\n]/);

    for (var i=0; i<batch.length; i++) {
      if (!batch[i]) { continue; }
      assert.equal(batch[i], new SvgPath(batch[i]).toString());
    }
  });


  it('empty string', function () {
    assert.equal('', new SvgPath('').toString());
  });


  it('params formats', function () {
    assert.equal('M0 0', new SvgPath('M 0.0 0.0').toString());
    assert.equal('M100 0', new SvgPath('M 1e+2 0').toString());
    assert.equal('M100 0', new SvgPath('M +1e+2 0').toString());
    assert.equal('M0.01 0', new SvgPath('M 1e-2 0').toString());
    assert.equal('M0.001 0', new SvgPath('M 0.1e-2 0').toString());
    assert.equal('M0.001 0', new SvgPath('M .1e-2 0').toString());
  });
});
{'fraction_non_alphanumeric': 0.2352568167406468, 'fraction_numerical': 0.030437539632213063, 'mean_word_length': 3.457627118644068, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5779382', 'n_tokens_mistral': 593, 'n_tokens_neox': 547, 'n_words': 123}