<commit_before>#!/bin/sh -e

set -e


echo "test => $0"

OLDPASSWORD=$(< ${KC_PASSFILE})
PASSWORD='<PASSWORD>'

if printf "passwd\n${PASSWORD}\n${PASSWORD}\n" |./kc -b -k ${KC_DB} -p ${KC_PASSFILE};then
	echo "$0 test ok (passwd)!"
else
	echo "$0 test failed (passwd)!"
	exit 1
fi

echo "${PASSWORD}" > ${KC_PASSFILE}

if printf "passwd\n${OLDPASSWORD}\n${OLDPASSWORD}\n" |./kc -b -k ${KC_DB} -p ${KC_PASSFILE};then
	echo "$0 test ok (passwd)!"
else
	echo "$0 test failed (passwd)!"
	exit 1
fi

echo "${OLDPASSWORD}" > ${KC_PASSFILE}

if echo "" |./kc -b -k ${KC_DB} -p ${KC_PASSFILE};then
	echo "$0 test ok (reopen)!"
else<commit_msg>Distinguish between two separate sub-tests.<commit_after>#!/bin/sh -e

set -e


echo "test => $0"

OLDPASSWORD=$(< ${KC_PASSFILE})
PASSWORD='<PASSWORD>'

if printf "passwd\n${PASSWORD}\n${PASSWORD}\n" |./kc -b -k ${KC_DB} -p ${KC_PASSFILE};then
	echo "$0 test ok (passwd)!"
else
	echo "$0 test failed (passwd)!"
	exit 1
fi

echo "${PASSWORD}" > ${KC_PASSFILE}

if printf "passwd\n${OLDPASSWORD}\n${OLDPASSWORD}\n" |./kc -b -k ${KC_DB} -p ${KC_PASSFILE};then
	echo "$0 test ok (old passwd)!"
else
	echo "$0 test failed (old passwd)!"
	exit 1
fi

echo "${OLDPASSWORD}" > ${KC_PASSFILE}

if echo "" |./kc -b -k ${KC_DB} -p ${KC_PASSFILE};then
	echo "$0 test ok (reopen)!"
else
{'fraction_non_alphanumeric': 0.21253822629969418, 'fraction_numerical': 0.012232415902140673, 'mean_word_length': 4.257028112449799, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '6679841', 'n_tokens_mistral': 579, 'n_tokens_neox': 551, 'n_words': 157}