<commit_before>wins=0
fails=0
testcases=0

# looks for global var $sbb_section
print_section () {
        printf "%5s " $sbb_section
}

# for internal (to the framework) assertions, set variable internal=1
# $1 message
fail () {
        local message=$1
        [ -n "$1" ] || die_error "fail() \$1 must be a non-zero message"
        ((internal)) && die_error "internal assertion failed: $1"
        print_section
        echo -e "${Red}[FAIL]${Color_Off} $message"
        fails=$((fails+1))
        if((pause)); then
                debug_all_errors
                echo "Pausing as requested.  Go fix it cowboy! Hit any key to continue (pro-tip: ctrl-Z to background and fg to resume again)"
                read
        fi
}

# $1 message
win () {
        local message=$1
        [ -n "$1" ] || die_error "win() \$1 must be a non-zero message"
        ((!internal)) && print_section && echo -e "${Green}[WIN!]${Color_Off} $message"
        wins=$((wins+1))
}

# $1 message
debug () {
        local message=$1
        [ -n "$1" ] || die_error "debug() \$1 must be a non-zero message"
        if((debug)); then
                print_section
                echo -e "${BBlack}debug: $message$Color_Off"
        fi
}

# $1 message
# stdin: all lines to go into debug output
debug_stream () {
        local message=$1
        [ -n "$1" ] || die_error "debug_stream() \$1 must be a non-zero message"
        debug "$message"
        while read line; do
                debug "$line"
        done
}

# $1 test case
run_test () {<commit_msg>debug_stream() bugfix: don't try to show empty messages<commit_after>wins=0
fails=0
testcases=0

# looks for global var $sbb_section
print_section () {
        printf "%5s " $sbb_section
}

# for internal (to the framework) assertions, set variable internal=1
# $1 message
fail () {
        local message=$1
        [ -n "$1" ] || die_error "fail() \$1 must be a non-zero message"
        ((internal)) && die_error "internal assertion failed: $1"
        print_section
        echo -e "${Red}[FAIL]${Color_Off} $message"
        fails=$((fails+1))
        if((pause)); then
                debug_all_errors
                echo "Pausing as requested.  Go fix it cowboy! Hit any key to continue (pro-tip: ctrl-Z to background and fg to resume again)"
                read
        fi
}

# $1 message
win () {
        local message=$1
        [ -n "$1" ] || die_error "win() \$1 must be a non-zero message"
        ((!internal)) && print_section && echo -e "${Green}[WIN!]${Color_Off} $message"
        wins=$((wins+1))
}

# $1 message
debug () {
        local message=$1
        [ -n "$1" ] || die_error "debug() \$1 must be a non-zero message"
        if((debug)); then
                print_section
                echo -e "${BBlack}debug: $message$Color_Off"
        fi
}

# $1 message
# stdin: all lines to go into debug output
debug_stream () {
        local message=$1
        [ -n "$1" ] || die_error "debug_stream() \$1 must be a non-zero message"
        debug "$message"
        while read line; do
                [ -n "$line" ] && debug "$line"
        done
}

# $1 test case
run_test () {
{'fraction_non_alphanumeric': 0.13957934990439771, 'fraction_numerical': 0.015933715742511154, 'mean_word_length': 2.139, 'pattern_counts': {'":': 0, '<': 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': '2581438', 'n_tokens_mistral': 1001, 'n_tokens_neox': 977, 'n_words': 321}