<commit_before>#!/usr/bin/env bats

source "${BATS_TEST_DIRNAME}/setup"

@test 'awesome_shell_help add support for  -h and --help switches' {
    local script_name="validate_help"
    local script_path="$BATS_TMPDIR/$script_name"
    local test_help_message='Testing help module'
    cat > "$script_path" <<_CONTENT_
#!/usr/bin/env awesome-bash

awesome_shell_help <<_HELP_
Usage: \$awesome_shell_script_name [-h|--help]
    $test_help_message
_HELP_

_CONTENT_
    chmod u+x "$script_path"
    run "$script_path"
    [ "$status" -eq 0 ]

    run $script_path -h
    [ "$status" -eq 1 ]
    [ "${lines[0]}" = "Usage: $script_name [-h|--help]" ]
    [ "${lines[1]}" = "    $test_help_message" ]<commit_msg>Use bats load instead of source<commit_after>#!/usr/bin/env bats

load "${BATS_TEST_DIRNAME}/setup"

@test 'awesome_shell_help add support for  -h and --help switches' {
    local script_name="validate_help"
    local script_path="$BATS_TMPDIR/$script_name"
    local test_help_message='Testing help module'
    cat > "$script_path" <<_CONTENT_
#!/usr/bin/env awesome-bash

awesome_shell_help <<_HELP_
Usage: \$awesome_shell_script_name [-h|--help]
    $test_help_message
_HELP_

_CONTENT_
    chmod u+x "$script_path"
    run "$script_path"
    [ "$status" -eq 0 ]

    run $script_path -h
    [ "$status" -eq 1 ]
    [ "${lines[0]}" = "Usage: $script_name [-h|--help]" ]
    [ "${lines[1]}" = "    $test_help_message" ]
{'fraction_non_alphanumeric': 0.15568022440392706, 'fraction_numerical': 0.005610098176718092, 'mean_word_length': 3.820945945945946, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5168134', 'n_tokens_mistral': 555, 'n_tokens_neox': 531, 'n_words': 113}