Archived
50 lines
1.7 KiB
EmacsLisp
50 lines
1.7 KiB
EmacsLisp
// test-sga.el - Old Irish morphology tests
|
|
// Tests morph_conjugate dispatch for "sga", copula "is" (via "be"),
|
|
// verb "téit" (go), and morph_pluralize fallback.
|
|
|
|
fn test_sga() {
|
|
let profile: [String] = lang_profile_sga()
|
|
|
|
// Copula "be" present 3sg -> "is"
|
|
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
|
|
if !str_eq(r1, "is") {
|
|
println("FAIL: sga copula present 3sg: expected 'is' got '" + r1 + "'")
|
|
} else {
|
|
println("PASS: sga copula present 3sg")
|
|
}
|
|
|
|
// Copula "be" past 3sg -> "ba"
|
|
let r2: String = morph_conjugate("be", "past", "third", "singular", profile)
|
|
if !str_eq(r2, "ba") {
|
|
println("FAIL: sga copula past 3sg: expected 'ba' got '" + r2 + "'")
|
|
} else {
|
|
println("PASS: sga copula past 3sg")
|
|
}
|
|
|
|
// "téit" (to go) present 3sg -> "téit"
|
|
let r3: String = morph_conjugate("téit", "present", "third", "singular", profile)
|
|
if !str_eq(r3, "téit") {
|
|
println("FAIL: sga teit present 3sg: expected 'téit' got '" + r3 + "'")
|
|
} else {
|
|
println("PASS: sga teit present 3sg")
|
|
}
|
|
|
|
// "téit" past 3sg -> "luid"
|
|
let r4: String = morph_conjugate("téit", "past", "third", "singular", profile)
|
|
if !str_eq(r4, "luid") {
|
|
println("FAIL: sga teit past 3sg: expected 'luid' got '" + r4 + "'")
|
|
} else {
|
|
println("PASS: sga teit past 3sg")
|
|
}
|
|
|
|
// morph_pluralize: fusional fallback returns noun unchanged
|
|
let r5: String = morph_pluralize("fer", profile)
|
|
if !str_eq(r5, "fer") {
|
|
println("FAIL: sga pluralize fallback: expected 'fer' got '" + r5 + "'")
|
|
} else {
|
|
println("PASS: sga pluralize fallback")
|
|
}
|
|
}
|
|
|
|
test_sga()
|