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

# Navigate to test directory
TEST_DIR=$PWD/test
BIN_DIR=$PWD/bin

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

# Create fixture helper
fixture_dir() {
  TMP_DIR=$(mktemp -d)
  cp -r "$TEST_DIR"/test_files/$1/* $TMP_DIR
  cd $TMP_DIR
  echo $TMP_DIR
  test -d dotgit && mv dotgit .git
}

# A branch ahead of master
fixture_dir 'branch-ahead'

  # when sqwished
  # TODO: Use message to start and open issue to adress testing this case (as it is used every day)
  # $BIN_DIR/git-sqwish master
  expect $TEST_DIR/expect_tmp.sh 1> /dev/null
  cat message.txt
  git status --porcelain

    # prompts for a message

    # when given a message

      # is on a `.squashed` branch

      # is squashed (one commit ahead of `master)

      # has the given commit message

      # has the changes from previous branch

  # when sqwished with a message
<commit_msg>Adding more TODOs<commit_after>#!/usr/bin/env bash

# Navigate to test directory
TEST_DIR=$PWD/test
BIN_DIR=$PWD/bin

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

# Create fixture helper
fixture_dir() {
  TMP_DIR=$(mktemp -d)
  cp -r "$TEST_DIR"/test_files/$1/* $TMP_DIR
  cd $TMP_DIR
  echo $TMP_DIR
  test -d dotgit && mv dotgit .git
}

# A branch ahead of master
fixture_dir 'branch-ahead'

  # when sqwished
  # TODO: Use message to start and open issue to adress testing this case (as it is used every day)
  # $BIN_DIR/git-sqwish master
  expect $TEST_DIR/expect_tmp.sh 1> /dev/null
  cat message.txt
  git status --porcelain

    # prompts for a message

    # when given a message

      # is on a `.squashed` branch
      # TODO: Renamed to .sqwished

      # is squashed (one commit ahead of `master)

      # has the given commit message

      # has the changes from previous branch

  # when sqwished with a message

{'fraction_non_alphanumeric': 0.09004739336492891, 'fraction_numerical': 0.00210637177461822, 'mean_word_length': 3.016913319238901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3065633', 'n_tokens_mistral': 673, 'n_tokens_neox': 643, 'n_words': 234}