50 lines
1.7 KiB
EmacsLisp
50 lines
1.7 KiB
EmacsLisp
// test-txb.el - Tocharian B morphology tests
|
|
// Tests morph_conjugate dispatch for "txb", copula "wes",
|
|
// verb "lyut" (see), and morph_pluralize fallback.
|
|
|
|
fn test_txb() {
|
|
let profile: [String] = lang_profile_txb()
|
|
|
|
// Copula "be" present 3sg -> "ste"
|
|
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
|
|
if !str_eq(r1, "ste") {
|
|
println("FAIL: txb copula present 3sg: expected 'ste' got '" + r1 + "'")
|
|
} else {
|
|
println("PASS: txb copula present 3sg")
|
|
}
|
|
|
|
// Copula "be" present 1sg -> "wes"
|
|
let r2: String = morph_conjugate("be", "present", "first", "singular", profile)
|
|
if !str_eq(r2, "wes") {
|
|
println("FAIL: txb copula present 1sg: expected 'wes' got '" + r2 + "'")
|
|
} else {
|
|
println("PASS: txb copula present 1sg")
|
|
}
|
|
|
|
// Copula "be" past 3sg -> "wes" (txb only implements present; past returns stem)
|
|
let r3: String = morph_conjugate("be", "past", "third", "singular", profile)
|
|
if !str_eq(r3, "wes") {
|
|
println("FAIL: txb copula past 3sg: expected 'wes' got '" + r3 + "'")
|
|
} else {
|
|
println("PASS: txb copula past 3sg")
|
|
}
|
|
|
|
// "lyut" (to see) present 3sg -> "lyutem"
|
|
let r4: String = morph_conjugate("lyut", "present", "third", "singular", profile)
|
|
if !str_eq(r4, "lyutem") {
|
|
println("FAIL: txb lyut present 3sg: expected 'lyutem' got '" + r4 + "'")
|
|
} else {
|
|
println("PASS: txb lyut present 3sg")
|
|
}
|
|
|
|
// morph_pluralize: fusional fallback returns noun unchanged
|
|
let r5: String = morph_pluralize("walo", profile)
|
|
if !str_eq(r5, "walo") {
|
|
println("FAIL: txb pluralize fallback: expected 'walo' got '" + r5 + "'")
|
|
} else {
|
|
println("PASS: txb pluralize fallback")
|
|
}
|
|
}
|
|
|
|
test_txb()
|