<commit_before>@test
shared void testProcess() {
    // basically just test if everything can be called without error
    Anything args = process.arguments;
    if (is Anything[] args) {
        for (arg in args) {
            check(arg is String, "process.arguments");
        }
    } else {
        fail("process.arguments is no sequence");
    }
    Anything argPresent = process.namedArgumentPresent("");
    check(argPresent is Boolean, "process.namedArgumentPresent");
    check(!process.namedArgumentValue("") exists, "process.namedArgumentValue");
    String? filesep = process.propertyValue("file.separator");
    if (exists filesep) {
        check((filesep=="/")||(filesep=="\\"), "process.propertyValue");
    } else {
        fail("process.propertyValue (null)");
    }
    process.write("write");
    process.writeLine(" and writeLine");
    process.writeLine();
    process.flush();
    process.writeError("writeError");
    process.writeErrorLine(" and writeErrorLine");
    process.writeErrorLine();
    process.flushError();
    
    //language object
    check(language.version=="1.1.0", "language.version");
    check(language.majorVersion==1, "language.majorVersion");
    check(language.minorVersion==1, "language.minorVersion");
    check(language.releaseVersion==0, "language.releaseVersion");
    check(!language.versionName.empty, "language.versionName");
    check(language.majorVersionBinary==7, "language.majorVersionBinary");
    check(language.minorVersionBinary==0, "language.minorVersionBinary");
    print("Ceylon language version ``language.version`` major ``language.majorVersion`` " +
        "minor ``language.minorVersion`` release ``language.releaseVersion`` " +
        "\'``language.versionName``\' major bin ``language.majorVersionBinary`` minor bin " +
        "``language.minorVersionBinary``");
    check(process.string == "process", "process.string");
    check(language.string == "language", "language.string");
}

@test
shared void testSystem() {
    // basically just test if everything can be called without error
    print("system[milliseconds:``system.milliseconds``ms,nanoseconds:``system.nanoseconds``ns," +
           "timezoneOffset:``system.timezoneOffset``ms, locale: ``system.locale``]");
    check(system.milliseconds > 0, "system.milliseconds");
    check(system.nanoseconds > 0, "system.milliseconds");
    Integer timezoneOffset = system.timezoneOffset;
    check(timezoneOffset >= -(12 * 3600 * 1000), "system.timezoneOffset min value");
    check(timezoneOffset <= (14 * 3600 * 1000), "system.timezoneOffset max value");
    check(system.locale.size > 0, "system.locale");
}

@test<commit_msg>Added test for system.characterEncoding (#520)<commit_after>@test
shared void testProcess() {
    // basically just test if everything can be called without error
    Anything args = process.arguments;
    if (is Anything[] args) {
        for (arg in args) {
            check(arg is String, "process.arguments");
        }
    } else {
        fail("process.arguments is no sequence");
    }
    Anything argPresent = process.namedArgumentPresent("");
    check(argPresent is Boolean, "process.namedArgumentPresent");
    check(!process.namedArgumentValue("") exists, "process.namedArgumentValue");
    String? filesep = process.propertyValue("file.separator");
    if (exists filesep) {
        check((filesep=="/")||(filesep=="\\"), "process.propertyValue");
    } else {
        fail("process.propertyValue (null)");
    }
    process.write("write");
    process.writeLine(" and writeLine");
    process.writeLine();
    process.flush();
    process.writeError("writeError");
    process.writeErrorLine(" and writeErrorLine");
    process.writeErrorLine();
    process.flushError();
    
    //language object
    check(language.version=="1.1.0", "language.version");
    check(language.majorVersion==1, "language.majorVersion");
    check(language.minorVersion==1, "language.minorVersion");
    check(language.releaseVersion==0, "language.releaseVersion");
    check(!language.versionName.empty, "language.versionName");
    check(language.majorVersionBinary==7, "language.majorVersionBinary");
    check(language.minorVersionBinary==0, "language.minorVersionBinary");
    print("Ceylon language version ``language.version`` major ``language.majorVersion`` " +
        "minor ``language.minorVersion`` release ``language.releaseVersion`` " +
        "\'``language.versionName``\' major bin ``language.majorVersionBinary`` minor bin " +
        "``language.minorVersionBinary``");
    check(process.string == "process", "process.string");
    check(language.string == "language", "language.string");
}

@test
shared void testSystem() {
    // basically just test if everything can be called without error
    print("system[milliseconds:``system.milliseconds``ms,nanoseconds:``system.nanoseconds``ns," +
           "timezoneOffset:``system.timezoneOffset``ms, locale: ``system.locale``]");
    check(system.milliseconds > 0, "system.milliseconds");
    check(system.nanoseconds > 0, "system.milliseconds");
    Integer timezoneOffset = system.timezoneOffset;
    check(timezoneOffset >= -(12 * 3600 * 1000), "system.timezoneOffset min value");
    check(timezoneOffset <= (14 * 3600 * 1000), "system.timezoneOffset max value");
    check(system.locale.size > 0, "system.locale");
    check(system.characterEncoding.size > 0, "system.characterEncoding");
}

@test
{'fraction_non_alphanumeric': 0.15299539170506912, 'fraction_numerical': 0.01216589861751152, 'mean_word_length': 4.222329162656401, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '468955', 'n_tokens_mistral': 1541, 'n_tokens_neox': 1475, 'n_words': 308}