<commit_before>var shell = require('shelljs');
var path = require('path');

var lsc = ['node_modules', '.bin', 'lsc'].join(path.sep);

var all_test = shell.find('test').filter(
    function (file) { return file.match(/\.ls$/); });

for (var i = 0; i < all_test.length; ++i) {
    console.log("Run " + all_test[i]);
    shell.exec(lsc + " " + all_test[i], function(code){
        if (code !== 0) {
            return code;
        }
    });
}<commit_msg>Propagate return code in test.js, fixed #2<commit_after>var shell = require('shelljs');
var path = require('path');

var lsc = ['node_modules', '.bin', 'lsc'].join(path.sep);

var all_test = shell.find('test').filter(
    function (file) { return file.match(/\.ls$/); });

for (var i = 0; i < all_test.length; ++i) {
    console.log("Run " + all_test[i]);
    var ret = shell.exec(lsc + " " + all_test[i]);
    if (ret.code !== 0) {
        shell.exit(ret.code);
    }
}
{'fraction_non_alphanumeric': 0.21668472372697725, 'fraction_numerical': 0.005417118093174431, 'mean_word_length': 3.1434977578475336, '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': '5901357', 'n_tokens_mistral': 344, 'n_tokens_neox': 336, 'n_words': 76}