This repository has been archived on 2026-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2026-05-02 22:15:25 -05:00

51 lines
1.8 KiB
EmacsLisp

// test-sux.el - Sumerian morphology tests
// Tests morph_conjugate dispatch for "sux", copula "me" (via "be"),
// verb "dug4" (say), and morph_pluralize fallback.
// NOTE: sux copula 3sg present returns "" (zero copula).
fn test_sux() {
let profile: [String] = lang_profile_sux()
// Copula "be" present 3sg -> "" (zero copula)
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
if !str_eq(r1, "") {
println("FAIL: sux copula present 3sg: expected '' got '" + r1 + "'")
} else {
println("PASS: sux copula present 3sg (zero copula)")
}
// Copula "be" present 1sg -> "me-en"
let r2: String = morph_conjugate("be", "present", "first", "singular", profile)
if !str_eq(r2, "me-en") {
println("FAIL: sux copula present 1sg: expected 'me-en' got '" + r2 + "'")
} else {
println("PASS: sux copula present 1sg")
}
// Copula "be" past 3sg -> "ba-me"
let r3: String = morph_conjugate("be", "past", "third", "singular", profile)
if !str_eq(r3, "ba-me") {
println("FAIL: sux copula past 3sg: expected 'ba-me' got '" + r3 + "'")
} else {
println("PASS: sux copula past 3sg")
}
// "dug4" (to say) present 3sg -> "e" (imperfective stem "e", no suffix for 3sg)
let r4: String = morph_conjugate("dug4", "present", "third", "singular", profile)
if !str_eq(r4, "e") {
println("FAIL: sux dug4 present 3sg: expected 'e' got '" + r4 + "'")
} else {
println("PASS: sux dug4 present 3sg")
}
// morph_pluralize: agglutinative fallback returns noun unchanged
let r5: String = morph_pluralize("lugal", profile)
if !str_eq(r5, "lugal") {
println("FAIL: sux pluralize fallback: expected 'lugal' got '" + r5 + "'")
} else {
println("PASS: sux pluralize fallback")
}
}
test_sux()