// test-cop.el - Coptic (Sahidic) morphology tests
// Tests morph_conjugate dispatch for "cop", copula "be" (zero copula in
// present, ϣωπε otherwise), verb "bwk" (go), and morph_pluralize fallback.
// NOTE: Coptic uses Greek + Demotic-derived letters; the El VM outputs
// non-ASCII as numeric hashes.  str_eq comparisons work correctly on UTF-8.

fn test_cop() {
    let profile: [String] = lang_profile_cop()

    // Copula "be" present 3sg -> "" (zero copula — inherited from Egyptian)
    let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
    if !str_eq(r1, "") {
        println("FAIL: cop copula present 3sg: expected '' got '" + r1 + "'")
    } else {
        println("PASS: cop copula present 3sg (zero copula)")
    }

    // Copula "be" past 3sg -> "ⲁϥϣⲱⲡⲉ" (a-f-shwpe)
    let r2: String = morph_conjugate("be", "past", "third", "singular", profile)
    if !str_eq(r2, "ⲁϥϣⲱⲡⲉ") {
        println("FAIL: cop copula past 3sg: expected 'afshwpe' got '" + r2 + "'")
    } else {
        println("PASS: cop copula past 3sg")
    }

    // "bwk" (to go) present 3sg -> "ϥⲃⲱⲕ" (f-bwk)
    let r3: String = morph_conjugate("bwk", "present", "third", "singular", profile)
    if !str_eq(r3, "ϥⲃⲱⲕ") {
        println("FAIL: cop bwk present 3sg: expected 'fbwk' got '" + r3 + "'")
    } else {
        println("PASS: cop bwk present 3sg")
    }

    // "bwk" (to go) past 3sg -> "ⲁϥⲃⲱⲕ" (a-f-bwk)
    let r4: String = morph_conjugate("bwk", "past", "third", "singular", profile)
    if !str_eq(r4, "ⲁϥⲃⲱⲕ") {
        println("FAIL: cop bwk past 3sg: expected 'afbwk' got '" + r4 + "'")
    } else {
        println("PASS: cop bwk past 3sg")
    }

    // morph_pluralize: agglutinative fallback returns noun unchanged
    let r5: String = morph_pluralize("ⲣⲱⲙⲉ", profile)
    if !str_eq(r5, "ⲣⲱⲙⲉ") {
        println("FAIL: cop pluralize fallback: expected noun unchanged got '" + r5 + "'")
    } else {
        println("PASS: cop pluralize fallback")
    }
}

test_cop()
