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

cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." || exit 1

. test_utilities.sh

cd "$CATS_EXAMPLE_DIR" || exit 1
./clean.sh
./init.sh

print_double_separator
echo "TEST: Test yaml validation"

test_invalid_yaml() {
    pushd .clowder/versions || exit 1
    test_cases=( $(ls -d test-*) )
    popd || exit 1

    for test in "${test_cases[@]}"
    do
        $COMMAND link -v $test || exit 1
        print_single_separator
        $COMMAND herd
        exit_code=$?
        if [ "$exit_code" != '42' ]; then
            exit 1
        fi
        print_single_separator
        rm clowder.yaml || exit 1
    done
}
test_invalid_yaml<commit_msg>Fix yaml validation test script<commit_after>#!/usr/bin/env bash

cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." || exit 1

. test_utilities.sh

cd "$CATS_EXAMPLE_DIR" || exit 1
./clean.sh
./init.sh

print_double_separator
echo "TEST: Test yaml validation"

test_invalid_yaml() {
    pushd .clowder/versions || exit 1
    test_cases=( $(ls -d test-*) )
    popd || exit 1

    for test in "${test_cases[@]}"
    do
        $COMMAND link -v $test || exit 1
        print_single_separator
        $COMMAND herd && exit 1
        # exit_code=$?
        # if [ "$exit_code" != '42' ]; then
        #     exit 1
        # fi
        print_single_separator
        rm clowder.yaml || exit 1
    done
}
test_invalid_yaml
{'fraction_non_alphanumeric': 0.141643059490085, 'fraction_numerical': 0.014872521246458924, 'mean_word_length': 2.332547169811321, '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': '6629623', 'n_tokens_mistral': 525, 'n_tokens_neox': 482, 'n_words': 131}