Archived
51 lines
1.8 KiB
EmacsLisp
51 lines
1.8 KiB
EmacsLisp
// test-egy.el - Ancient Egyptian (Middle Egyptian) morphology tests
|
|
// Tests morph_conjugate dispatch for "egy", copula "wnn" (via "be"),
|
|
// verb "mAA" (see), and morph_pluralize fallback.
|
|
// NOTE: egy copula in present returns "" (zero copula).
|
|
|
|
fn test_egy() {
|
|
let profile: [String] = lang_profile_egy()
|
|
|
|
// Copula "be" present 3sg -> "" (zero copula)
|
|
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
|
|
if !str_eq(r1, "") {
|
|
println("FAIL: egy copula present 3sg: expected '' got '" + r1 + "'")
|
|
} else {
|
|
println("PASS: egy copula present 3sg (zero copula)")
|
|
}
|
|
|
|
// Copula "be" past 3sg -> "wnn.n=f"
|
|
let r2: String = morph_conjugate("be", "past", "third", "singular", profile)
|
|
if !str_eq(r2, "wnn.n=f") {
|
|
println("FAIL: egy copula past 3sg: expected 'wnn.n=f' got '" + r2 + "'")
|
|
} else {
|
|
println("PASS: egy copula past 3sg")
|
|
}
|
|
|
|
// "mAA" (to see) present 3sg -> "mAA=f"
|
|
let r3: String = morph_conjugate("mAA", "present", "third", "singular", profile)
|
|
if !str_eq(r3, "mAA=f") {
|
|
println("FAIL: egy mAA present 3sg: expected 'mAA=f' got '" + r3 + "'")
|
|
} else {
|
|
println("PASS: egy mAA present 3sg")
|
|
}
|
|
|
|
// "mAA" past 3sg -> "mAA.n=f"
|
|
let r4: String = morph_conjugate("mAA", "past", "third", "singular", profile)
|
|
if !str_eq(r4, "mAA.n=f") {
|
|
println("FAIL: egy mAA past 3sg: expected 'mAA.n=f' got '" + r4 + "'")
|
|
} else {
|
|
println("PASS: egy mAA past 3sg")
|
|
}
|
|
|
|
// morph_pluralize: agglutinative fallback returns noun unchanged
|
|
let r5: String = morph_pluralize("nTr", profile)
|
|
if !str_eq(r5, "nTr") {
|
|
println("FAIL: egy pluralize fallback: expected 'nTr' got '" + r5 + "'")
|
|
} else {
|
|
println("PASS: egy pluralize fallback")
|
|
}
|
|
}
|
|
|
|
test_egy()
|