<commit_before>#!/bin/bash

go get github.com/BurntSushi/toml-test # install test suite
go get github.com/BurntSushi/toml/toml-test-go # install my parser
go build -o test_program_bin github.com/pelletier/go-toml/test_program

toml_test_wrapper() {
    ret=0
    if hash toml-test 2>/dev/null; then # test availability in $PATH
        toml-test "$@"
        ret=$?
    else
        p="$HOME/gopath/bin/toml-test" # try in Travi's place
        if [ -f "$p" ]; then
            "$p" "$@"
            ret=$?
        else
            "$GOPATH/bin/toml-test" "$@"
            ret=$?
        fi
    fi
}

toml_test_wrapper ./test_program_bin | tee test_out
ret="$([ `tail -n 1 test_out | sed -E 's/^.+([0-9]+) failed$/\1/'` -eq 0 ])"
exit $ret<commit_msg>Remove outdated test dependency<commit_after>#!/bin/bash

go get github.com/BurntSushi/toml-test # install test suite
go build -o test_program_bin github.com/pelletier/go-toml/test_program

toml_test_wrapper() {
    ret=0
    if hash toml-test 2>/dev/null; then # test availability in $PATH
        toml-test "$@"
        ret=$?
    else
        p="$HOME/gopath/bin/toml-test" # try in Travi's place
        if [ -f "$p" ]; then
            "$p" "$@"
            ret=$?
        else
            "$GOPATH/bin/toml-test" "$@"
            ret=$?
        fi
    fi
}

toml_test_wrapper ./test_program_bin | tee test_out
ret="$([ `tail -n 1 test_out | sed -E 's/^.+([0-9]+) failed$/\1/'` -eq 0 ])"
exit $ret
{'fraction_non_alphanumeric': 0.15898141775636615, 'fraction_numerical': 0.009635237439779766, 'mean_word_length': 2.167755991285403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1968458', 'n_tokens_mistral': 567, 'n_tokens_neox': 536, 'n_words': 126}