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

50 lines
1.7 KiB
EmacsLisp

// test-peo.el - Old Persian morphology tests
// Tests morph_conjugate dispatch for "peo", copula "ah-" (via "be"),
// verb "kar" (do/make), and morph_pluralize fallback.
fn test_peo() {
let profile: [String] = lang_profile_peo()
// Copula "be" present 3sg -> "astiy"
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
if !str_eq(r1, "astiy") {
println("FAIL: peo copula present 3sg: expected 'astiy' got '" + r1 + "'")
} else {
println("PASS: peo copula present 3sg")
}
// Copula "be" past 3sg -> "āha"
let r2: String = morph_conjugate("be", "past", "third", "singular", profile)
if !str_eq(r2, "āha") {
println("FAIL: peo copula past 3sg: expected 'āha' got '" + r2 + "'")
} else {
println("PASS: peo copula past 3sg")
}
// "kar" (to do) present 3sg -> "kunautiy"
let r3: String = morph_conjugate("kar", "present", "third", "singular", profile)
if !str_eq(r3, "kunautiy") {
println("FAIL: peo kar present 3sg: expected 'kunautiy' got '" + r3 + "'")
} else {
println("PASS: peo kar present 3sg")
}
// "kar" past 3sg -> "akunava"
let r4: String = morph_conjugate("kar", "past", "third", "singular", profile)
if !str_eq(r4, "akunava") {
println("FAIL: peo kar past 3sg: expected 'akunava' got '" + r4 + "'")
} else {
println("PASS: peo kar past 3sg")
}
// morph_pluralize: fusional fallback returns noun unchanged
let r5: String = morph_pluralize("martiya", profile)
if !str_eq(r5, "martiya") {
println("FAIL: peo pluralize fallback: expected 'martiya' got '" + r5 + "'")
} else {
println("PASS: peo pluralize fallback")
}
}
test_peo()