<commit_before>#!/bin/sh

cd "$(dirname "$0")"
set -e

elm-package install -y

VERSION_DIR="$(ls elm-stuff/packages/elm-lang/core/)"
CORE_PACKAGE_DIR="elm-stuff/packages/elm-lang/core/$VERSION_DIR"
CORE_GIT_DIR="$(dirname $PWD)"

echo "Linking $CORE_PACKAGE_DIR to $CORE_GIT_DIR"
rm -rf $CORE_PACKAGE_DIR
ln -s $CORE_GIT_DIR $CORE_PACKAGE_DIR

elm-make --yes --output test.js Test.elm
cat elm-io-ports.js >> test.js
node test.js<commit_msg>Update test runner script for elm-console<commit_after>#!/bin/sh

cd "$(dirname "$0")"
set -e


VERSION_DIR="$(ls elm-stuff/packages/elm-lang/core/)"
CORE_PACKAGE_DIR="elm-stuff/packages/elm-lang/core/$VERSION_DIR"
CORE_GIT_DIR="$(dirname $PWD)"
ELM_CONSOLE_VERSION_DIR="$(ls elm-stuff/packages/laszlopandy/elm-console/)"
ELM_IO_PATH="elm-stuff/packages/laszlopandy/elm-console/$ELM_CONSOLE_VERSION_DIR/elm-io.sh"

echo "Linking $CORE_PACKAGE_DIR to $CORE_GIT_DIR"
rm -rf $CORE_PACKAGE_DIR
ln -s $CORE_GIT_DIR $CORE_PACKAGE_DIR

elm-make --yes --output raw-test.js Test.elm
bash $ELM_IO_PATH raw-test.js test.js 
node test.js
{'fraction_non_alphanumeric': 0.15305164319248826, 'fraction_numerical': 0.0018779342723004694, 'mean_word_length': 5.460606060606061, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5241512', 'n_tokens_mistral': 450, 'n_tokens_neox': 430, 'n_words': 77}