<commit_before># Navigate to test directory
TEST_DIR=$PWD/test

# Move any test .git directories back to dotgit
make move-git-to-dotgit > /dev/null

fixture_dir() {
  TMP_DIR=$(mktemp -d)
  cp -r "$TEST_DIR"/test-files/$1/* $TMP_DIR
  cd $TMP_DIR
  test -d dotgit && mv dotgit .git
}

fixture_git_init() {
  TMP_DIR=$(mktemp -d)
  cd $TMP_DIR
  git init 1> /dev/null
}

# Load in bash_prompt
. .bash_prompt

# sexy-bash-prompt

  # when run as a script
  prompt_output="$(bash --norc --noprofile -i -c '. .bash_prompt')"

    # does not have any output
    test ${#prompt_output} -eq 0 || echo '`prompt_output` did not have length 0' 1>&2

# # get_prompt_symbol
#   # with a normal user
#   echo '---'

#   bash_symbol="$(bash --norc --noprofile -i -c '. .bash_prompt')"
#   # bash_symbol="$(bash --norc --noprofile -i -c '. .bash_prompt; echo -n $(get_prompt_symbol)')"

#     # is $
#     # bash_symbol="$"
#     echo ${bash_symbol:0:1}
#     echo ${bash_symbol:1:1}
#     echo ${bash_symbol:2:1}
#     echo ${bash_symbol:3:1}
#     echo ${bash_symbol:4:1}
#     echo ${bash_symbol:5:1}
#     echo ${#bash_symbol}
#     test ${bash_symbol:0} = "$" || echo '`get_prompt_symbol` !== "$" for a normal user' 1>&2

#   # with root
#   bash_symbol="$(sudo bash --norc --noprofile -i -c '. .bash_prompt; echo -n $(get_prompt_symbol)')"

#     # is #
#     echo -n "$bash_symbol"
#     test "$bash_symbol" = "#" || echo '`get_prompt_symbol` !== "#" for root' 1>&2

# is_on_git

  # in a git directory
  fixture_dir 'git'

    # has an exit code of 0
    is_on_git || echo '`is_on_git`; $? != 0 in git directory' 1>&2
<commit_msg>Re-enabled and completed tests for bash symbols<commit_after># Navigate to test directory
TEST_DIR=$PWD/test

# Move any test .git directories back to dotgit
make move-git-to-dotgit > /dev/null

fixture_dir() {
  TMP_DIR=$(mktemp -d)
  cp -r "$TEST_DIR"/test-files/$1/* $TMP_DIR
  cd $TMP_DIR
  test -d dotgit && mv dotgit .git
}

fixture_git_init() {
  TMP_DIR=$(mktemp -d)
  cd $TMP_DIR
  git init 1> /dev/null
}

# Load in bash_prompt
. .bash_prompt

# sexy-bash-prompt

  # when run as a script
  prompt_output="$(bash --norc --noprofile -i -c '. .bash_prompt')"

    # does not have any output
    test ${#prompt_output} -eq 0 || echo '`prompt_output` did not have length 0' 1>&2

# get_prompt_symbol
  # with a normal user
  bash_symbol="$(bash --norc --noprofile -i -c '. .bash_prompt; echo $(get_prompt_symbol)')"

    # is $
    test "$bash_symbol" = "$" || echo '`get_prompt_symbol` !== "$" for a normal user' 1>&2

  # with root
  bash_symbol="$(sudo bash --norc --noprofile -i -c '. .bash_prompt; echo $(get_prompt_symbol)')"

    # is #
    test "$bash_symbol" = "#" || echo '`get_prompt_symbol` !== "#" for root' 1>&2

# is_on_git

  # in a git directory
  fixture_dir 'git'

    # has an exit code of 0
    is_on_git || echo '`is_on_git`; $? != 0 in git directory' 1>&2

{'fraction_non_alphanumeric': 0.16609353507565336, 'fraction_numerical': 0.014099037138927097, 'mean_word_length': 3.085674157303371, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4398218', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1117, 'n_words': 307}