<commit_before>source $DIRNAME/../functions/_pure_prompt.fish
source $DIRNAME/../functions/_pure_prompt_virtualenv.fish
source $DIRNAME/../functions/_pure_prompt_vimode.fish
source $DIRNAME/../functions/_pure_prompt_symbol.fish
source $DIRNAME/../functions/_pure_print_prompt.fish

set --local failed 1
set --local succeed 0

test "print prompt after succeeding command"
    (
        set --local last_command $succeed
        set pure_symbol_prompt '>'  # using default ❯ break following tests

        _pure_prompt $last_command
    ) = (set_color green)'>'
end

test "print prompt after failing command"
    (
        set --local last_command $failed
        set pure_symbol_prompt '>'  # using default ❯ break following tests

        _pure_prompt $last_command<commit_msg>fix _pure_prompt.test.fish in CI<commit_after>source $DIRNAME/../functions/_pure_prompt.fish
source $DIRNAME/../functions/_pure_prompt_virtualenv.fish
source $DIRNAME/../functions/_pure_prompt_vimode.fish
source $DIRNAME/../functions/_pure_prompt_symbol.fish
source $DIRNAME/../functions/_pure_print_prompt.fish

set --local failed 1
set --local succeed 0

test "print prompt after succeeding command"
    (
        set pure_color_green (set_color green)
        set pure_symbol_prompt '>'  # using default ❯ break following tests
        set --local last_command $succeed

        _pure_prompt $last_command
    ) = (set_color green)'>'
end

test "print prompt after failing command"
    (
        set pure_color_green (set_color green)
        set pure_symbol_prompt '>'  # using default ❯ break following tests
        set --local last_command $failed

        _pure_prompt $last_command
{'fraction_non_alphanumeric': 0.09118176364727054, 'fraction_numerical': 0.0023995200959808036, 'mean_word_length': 3.4361702127659575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '898835', 'n_tokens_mistral': 534, 'n_tokens_neox': 480, 'n_words': 132}