<commit_before><commit_msg>combinators.cleave-tests: add tests for arr<commit_after>
USING: kernel math math.functions tools.test combinators.cleave ;

IN: combinators.cleave.tests

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

: unit-test* ( input output -- ) swap unit-test ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[ { [ 1 ] [ 2 ] [ 3 ] [ 4 ] } 0arr ]       [ { 1 2 3 4 } ] unit-test*

[ 3 { 1+ 1- 2^ } 1arr ]                    [ { 4 2 8 } ]   unit-test*

[ 3 4 { [ + ] [ - ] [ ^ ] } 2arr ]         [ { 7 -1 81 } ] unit-test*

[ 1 2 3 { [ + + ] [ - - ] [ * * ] } 3arr ] [ { 6 2 6 } ]   unit-test*


{'fraction_non_alphanumeric': 0.362406015037594, 'fraction_numerical': 0.04661654135338346, 'mean_word_length': 2.5052631578947366, '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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1074667', 'n_tokens_mistral': 281, 'n_tokens_neox': 231, 'n_words': 52}