Archived
50 lines
1.7 KiB
EmacsLisp
50 lines
1.7 KiB
EmacsLisp
// test-goh.el - Old High German morphology tests
|
|
// Tests morph_conjugate dispatch for "goh", copula "wesan", verb "haben",
|
|
// and morph_pluralize fallback.
|
|
|
|
fn test_goh() {
|
|
let profile: [String] = lang_profile_goh()
|
|
|
|
// Copula "be" present 3sg -> "ist"
|
|
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
|
|
if !str_eq(r1, "ist") {
|
|
println("FAIL: goh copula present 3sg: expected 'ist' got '" + r1 + "'")
|
|
} else {
|
|
println("PASS: goh copula present 3sg")
|
|
}
|
|
|
|
// Copula "be" past 1sg -> "was"
|
|
let r2: String = morph_conjugate("be", "past", "first", "singular", profile)
|
|
if !str_eq(r2, "was") {
|
|
println("FAIL: goh copula past 1sg: expected 'was' got '" + r2 + "'")
|
|
} else {
|
|
println("PASS: goh copula past 1sg")
|
|
}
|
|
|
|
// "haben" present 3sg -> "habet"
|
|
let r3: String = morph_conjugate("haben", "present", "third", "singular", profile)
|
|
if !str_eq(r3, "habet") {
|
|
println("FAIL: goh haben present 3sg: expected 'habet' got '" + r3 + "'")
|
|
} else {
|
|
println("PASS: goh haben present 3sg")
|
|
}
|
|
|
|
// "haben" past 1sg -> "habeta"
|
|
let r4: String = morph_conjugate("haben", "past", "first", "singular", profile)
|
|
if !str_eq(r4, "habeta") {
|
|
println("FAIL: goh haben past 1sg: expected 'habeta' got '" + r4 + "'")
|
|
} else {
|
|
println("PASS: goh haben past 1sg")
|
|
}
|
|
|
|
// morph_pluralize: fusional fallback returns noun unchanged
|
|
let r5: String = morph_pluralize("tag", profile)
|
|
if !str_eq(r5, "tag") {
|
|
println("FAIL: goh pluralize fallback: expected 'tag' got '" + r5 + "'")
|
|
} else {
|
|
println("PASS: goh pluralize fallback")
|
|
}
|
|
}
|
|
|
|
test_goh()
|