<commit_before><!DOCTYPE html>
<html>
    <head>
        <title>Gobo Test</title>
        <script src='/lib/chai.js'></script>
        <script src='/lib/test-framework.js'></script>
        <script src='/lib/watch.js'></script>
        <script src='/lib/gobo.js'></script>
        <script>var assert = chai.assert</script>
    </head>
    <body>
        {{{html}}}
        <script>
            (function (logic) {

                // Logic for reporting the result of the test
                var complete = false;
                function done ( result, message ) {
                    if ( !complete ) {
                        complete = true;
                        parent.postMessage( {
                            result: result,
                            id: document.location.search.substr(1),
                            message: message
                        }, "*" );
                    }
                }

                // If an error is thrown, report a failure
                window.onerror = done.bind(null, false);

                // Time the test
                setTimeout(done.bind(null, false, "Timeout"), 1000);

                // Run the test
                logic(
                    done.bind(null, true, "Passed"),
                    new Test.DocReader(document)
                );
            }(
                {{{logic}}}
            ));
        </script>
    </body>
</html>
<commit_msg>Show status in individual tests<commit_after><!DOCTYPE html>
<html>
    <head>
        <title>Gobo Test</title>
        <script src='/lib/chai.js'></script>
        <script src='/lib/test-framework.js'></script>
        <script src='/lib/watch.js'></script>
        <script src='/lib/gobo.js'></script>
        <script>var assert = chai.assert</script>
        <style>
            body.success:before {
                background: #e6efc2;
                color: #264409;
                content: "Test Passed";
            }

            .failure {
                background: #fbe3e4;
                color: #8a1f11;
            }

            body.success:before,
            .failure {
                display: block;
                padding: 0.8em;
                margin-bottom: 0.8em;
            }
        </style>
    </head>
    <body>
        {{{html}}}
        <script>
            (function (logic) {

                // Logic for reporting the result of the test
                var complete = false;
                function done ( result, message ) {
                    if ( !complete ) {
                        complete = true;
                        parent.postMessage( {
                            result: result,
                            id: document.location.search.substr(1),
                            message: message
                        }, "*" );

                        if ( result ) {
                            document.body.className += " success";
                        }
                        else {
                            var report = document.createElement("div");
                            report.className = "failure";
                            report.textContent = message;
                            document.body.insertBefore(
                                report, document.body.firstChild);
                        }
                    }
                }

                // If an error is thrown, report a failure
                window.onerror = done.bind(null, false);

                // Time the test
                setTimeout(done.bind(null, false, "Timeout"), 1000);

                // Run the test
                logic(
                    done.bind(null, true, "Passed"),
                    new Test.DocReader(document)
                );
            }(
                {{{logic}}}
            ));
        </script>
    </body>
</html>

{'fraction_non_alphanumeric': 0.1135064935064935, 'fraction_numerical': 0.007272727272727273, 'mean_word_length': 0.9469160768452983, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '5694260', 'n_tokens_mistral': 998, 'n_tokens_neox': 906, 'n_words': 202}