<commit_before>#!/bin/sh

cd tests

if [ ! -f "package.json" ]; then
  cp _package.json package.json
fi

if [ -d "examples" ]; then
  cd examples
  git pull
  cd -
else
  git clone https://github.com/d4rkr00t/aik-examples.git examples
fi

print_header() {
  local color_title="\033[0;34m"
  local color_reset="\033[0m"
  local color_info="\033[1;33m"
  echo ""
  echo "${color_info}$1${color_reset}"
  echo ""
}

#
# DEV SERVER
#

print_header "Thinkin in React -r"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js -r

print_header "Thinkin in React -r -n -o"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js -r -n -o

print_header "Simple Counter in Cycle.js"
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js

print_header "Simple Counter in Cycle.js -p"
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js -p 3232

print_header "TodoMVC Vue"
AIK_TEST=1 ./../cli.js examples/todomvc-vue/src/index.js

#
# BUILD
#

print_header "Thinkin in React --build"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js --build

print_header "Thinkin in React --build custom"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js --build custom

print_header "Simple Counter in Cycle.js --build custom --base \"/test/\""
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js --build custom2 --base "/test/"

print_header "Simple Counter in Cycle.js --build --base \"/test/\""
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js --build --base "/test/"

#
# AFTER RUN
#

cd ..<commit_msg>test(tests): Add test for -c flag<commit_after>#!/bin/sh

cd tests

if [ ! -f "package.json" ]; then
  cp _package.json package.json
fi

if [ -d "examples" ]; then
  cd examples
  git pull
  cd -
else
  git clone https://github.com/d4rkr00t/aik-examples.git examples
fi

print_header() {
  local color_title="\033[0;34m"
  local color_reset="\033[0m"
  local color_info="\033[1;33m"
  echo ""
  echo "${color_info}$1${color_reset}"
  echo ""
}

#
# DEV SERVER
#

print_header "Thinkin in React -r -c"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js -r -c

print_header "Thinkin in React -r -n -o -c"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js -r -n -o -c

print_header "Simple Counter in Cycle.js"
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js

print_header "Simple Counter in Cycle.js -p"
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js -p 3232

print_header "TodoMVC Vue"
AIK_TEST=1 ./../cli.js examples/todomvc-vue/src/index.js

#
# BUILD
#

print_header "Thinkin in React --build -c"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js --build -c

print_header "Thinkin in React --build custom -c"
AIK_TEST=1 ./../cli.js examples/thinking-in-react/src/index.js --build custom -c

print_header "Simple Counter in Cycle.js --build custom --base \"/test/\""
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js --build custom2 --base "/test/"

print_header "Simple Counter in Cycle.js --build --base \"/test/\""
AIK_TEST=1 ./../cli.js examples/simple-counter-cyclejs/src/index.js --build --base "/test/"

#
# AFTER RUN
#

cd ..
{'fraction_non_alphanumeric': 0.1709136109384711, 'fraction_numerical': 0.02113113735239279, 'mean_word_length': 3.164294954721863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '708159', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1225, 'n_words': 293}