<commit_before>USING: asn1 asn1.ldap io io.streams.string tools.test ;

[ 6 ] [
    "\u000002\u000001\u000006" <string-reader> [ asn-syntax read-ber ] with-input-stream
] unit-test

[ "testing" ] [
    "\u000004\u000007testing" <string-reader> [ asn-syntax read-ber ] with-input-stream
] unit-test

[ { 1 { 3 "Administrator" "ad_is_bogus" } } ] [
    "0$\u000002\u000001\u000001`\u00001f\u000002\u000001\u000003\u000004\rAdministrator\u000080\u00000bad_is_bogus"
    <string-reader> [ asn-syntax read-ber ] with-input-stream
] unit-test

[
    ! triggers fixnum
    [ B{ 2 3 131 134 80 } ] [ 50000 >ber ] unit-test

    [ B{ 10 3 131 134 80 } ] [ 50000 >ber-enumerated ] unit-test

    ! triggers bignum
    [ B{ 2 5 146 208 151 228 0 } ] [ 5000000000 >ber ] unit-test

    ! triggers string
    [ B{ 4 6 97 98 99 100 101 102 } ] [ "abcdef" >ber ] unit-test

    [ B{ 69 6 97 98 99 100 101 102 } ] [ 
        5 "abcdef" >ber-application-string 
    ] unit-test<commit_msg>asn1: use with-string-reader in the tests.<commit_after>USING: asn1 asn1.ldap io io.streams.string tools.test ;

[ 6 ] [
    "\u000002\u000001\u000006" [ asn-syntax read-ber ] with-string-reader
] unit-test

[ "testing" ] [
    "\u000004\u000007testing" [ asn-syntax read-ber ] with-string-reader
] unit-test

[ { 1 { 3 "Administrator" "ad_is_bogus" } } ] [
    "0$\u000002\u000001\u000001`\u00001f\u000002\u000001\u000003\u000004\rAdministrator\u000080\u00000bad_is_bogus"
    [ asn-syntax read-ber ] with-string-reader
] unit-test

[
    ! triggers fixnum
    [ B{ 2 3 131 134 80 } ] [ 50000 >ber ] unit-test

    [ B{ 10 3 131 134 80 } ] [ 50000 >ber-enumerated ] unit-test

    ! triggers bignum
    [ B{ 2 5 146 208 151 228 0 } ] [ 5000000000 >ber ] unit-test

    ! triggers string
    [ B{ 4 6 97 98 99 100 101 102 } ] [ "abcdef" >ber ] unit-test

    [ B{ 69 6 97 98 99 100 101 102 } ] [ 
        5 "abcdef" >ber-application-string 
    ] unit-test
{'fraction_non_alphanumeric': 0.13848547717842324, 'fraction_numerical': 0.19346473029045644, 'mean_word_length': 2.7311411992263057, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '5974264', 'n_tokens_mistral': 1082, 'n_tokens_neox': 745, 'n_words': 181}