<commit_before>var path = require('path'),
    fs = require('fs'),
    sys = require('util');

var less = require('../lib/less');

less.tree.functions.add = function (a, b) {
    return new(less.tree.Dimension)(a.value + b.value);
}
less.tree.functions.increment = function (a) {
    return new(less.tree.Dimension)(a.value + 1);
}
less.tree.functions._color = function (str) {
    if (str.value === "evil red") { return new(less.tree.Color)("600") }
}

sys.puts("\n" + stylize("LESS", 'underline') + "\n");

fs.readdirSync('test/less').forEach(function (file) {
    if (! /\.less/.test(file)) { return }

    toCSS('test/less/' + file, function (err, less) {
        var name = path.basename(file, '.less');

        fs.readFile(path.join('test/css', name) + '.css', 'utf-8', function (e, css) {
            sys.print("- " + name + ": ")
            if (less === css) { sys.print(stylize('OK', 'green')) }
            else if (err) {
                sys.print(stylize("ERROR: " + (err && err.message), 'red'));
            } else {<commit_msg>Adjusting the line feeds if they're windows based (\r\n) to \n.<commit_after>var path = require('path'),
    fs = require('fs'),
    sys = require('util');

var less = require('../lib/less');

less.tree.functions.add = function (a, b) {
    return new(less.tree.Dimension)(a.value + b.value);
}
less.tree.functions.increment = function (a) {
    return new(less.tree.Dimension)(a.value + 1);
}
less.tree.functions._color = function (str) {
    if (str.value === "evil red") { return new(less.tree.Color)("600") }
}

sys.puts("\n" + stylize("LESS", 'underline') + "\n");

fs.readdirSync('test/less').forEach(function (file) {
    if (! /\.less/.test(file)) { return }

    toCSS('test/less/' + file, function (err, less) {
        var name = path.basename(file, '.less');

        fs.readFile(path.join('test/css', name) + '.css', 'utf-8', function (e, css) {
            sys.print("- " + name + ": ")
            css = css && css.replace(/\r\n/g, '\n');
            if (less === css) { sys.print(stylize('OK', 'green')) }
            else if (err) {
                sys.print(stylize("ERROR: " + (err && err.message), 'red'));
            } else {
{'fraction_non_alphanumeric': 0.21816522136010955, 'fraction_numerical': 0.004564125969876769, 'mean_word_length': 2.708967851099831, 'pattern_counts': {'":': 2, '<': 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': '3695772', 'n_tokens_mistral': 764, 'n_tokens_neox': 749, 'n_words': 158}