<commit_before><commit_msg>Added basic dispatch tests.<commit_after>#!/bin/bash

OK='\033[38;1;32m[OK]\x1b[0m'
F='\033[38;1;31m[FAIL]\x1b[0m'
SKIP='\033[38;1;31m[SKIP]\x1b[0m'
DEBUG=$1||0
BASE_URL=presto.test

get() {
	echo -n "GET $1"
	response=`curl -s ${BASE_URL}/$1`
	
	case $? in
		22 )
			echo -e " #22 ${F}" ;;
		* )
			echo -e " #$? ${OK}"			
	esac
	
	if [ ${DEBUG} ] ; then echo ${response} | python -mjson.tool; fi
}

get "setup-tests/info.json"
get "setup-tests/info/utf8.json"
get "transmogrify/system/httpd.json"
get "transmogrify/system/httpd/headers.json"
{'fraction_non_alphanumeric': 0.21929824561403508, 'fraction_numerical': 0.06842105263157895, 'mean_word_length': 4.008771929824562, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2234112', 'n_tokens_mistral': 297, 'n_tokens_neox': 264, 'n_words': 44}