<commit_before>IN: validators.tests
USING: kernel sequences tools.test validators accessors
namespaces assocs ;

[ "" v-one-line ] must-fail
[ "hello world" ] [ "hello world" v-one-line ] unit-test
[ "hello\nworld" v-one-line ] must-fail

[ "" v-one-word ] must-fail
[ "hello" ] [ "hello" v-one-word ] unit-test
[ "hello world" v-one-word ] must-fail

[ "foo" v-number ] must-fail
[ 123 ] [ "123" v-number ] unit-test
[ 123 ] [ "123" v-integer ] unit-test

[ "1.0" v-integer ] [ "must be an integer" = ] must-fail-with

[ "<EMAIL>" ] [
    "<EMAIL>" v-email
] unit-test

[ "<EMAIL>" ] [
    "<EMAIL>" v-email
] unit-test

[ "<EMAIL>" v-email ]
[ "invalid e-mail" = ] must-fail-with

[ "sla@@factorcode.o" v-email ]
[ "invalid e-mail" = ] must-fail-with

[ "<EMAIL>" v-email ]
[ "invalid e-mail" = ] must-fail-with<commit_msg>Adding unit tests for v-checkbox<commit_after>IN: validators.tests
USING: kernel sequences tools.test validators accessors
namespaces assocs ;

[ "" v-one-line ] must-fail
[ "hello world" ] [ "hello world" v-one-line ] unit-test
[ "hello\nworld" v-one-line ] must-fail

[ "" v-one-word ] must-fail
[ "hello" ] [ "hello" v-one-word ] unit-test
[ "hello world" v-one-word ] must-fail

[ t ] [ "on" v-checkbox ] unit-test
[ f ] [ "off" v-checkbox ] unit-test

[ "foo" v-number ] must-fail
[ 123 ] [ "123" v-number ] unit-test
[ 123 ] [ "123" v-integer ] unit-test

[ "1.0" v-integer ] [ "must be an integer" = ] must-fail-with

[ "<EMAIL>" ] [
    "<EMAIL>" v-email
] unit-test

[ "<EMAIL>" ] [
    "<EMAIL>" v-email
] unit-test

[ "<EMAIL>" v-email ]
[ "invalid e-mail" = ] must-fail-with

[ "<EMAIL>@@factorcode.o" v-email ]
[ "invalid e-mail" = ] must-fail-with

[ "<EMAIL>" v-email ]
[ "invalid e-mail" = ] must-fail-with
{'fraction_non_alphanumeric': 0.2032054951345163, 'fraction_numerical': 0.01602747567258157, 'mean_word_length': 3.232445520581114, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '2752315', 'n_tokens_mistral': 720, 'n_tokens_neox': 700, 'n_words': 155}