Archived
50 lines
1.7 KiB
EmacsLisp
50 lines
1.7 KiB
EmacsLisp
// test-fro.el - Old French morphology tests
|
|
// Tests morph_conjugate dispatch for "fro", copula "estre", verb "avoir",
|
|
// and morph_pluralize fallback.
|
|
|
|
fn test_fro() {
|
|
let profile: [String] = lang_profile_fro()
|
|
|
|
// Copula "be" present 3sg -> "est"
|
|
let r1: String = morph_conjugate("be", "present", "third", "singular", profile)
|
|
if !str_eq(r1, "est") {
|
|
println("FAIL: fro copula present 3sg: expected 'est' got '" + r1 + "'")
|
|
} else {
|
|
println("PASS: fro copula present 3sg")
|
|
}
|
|
|
|
// Copula "be" past 3sg -> "fu"
|
|
let r2: String = morph_conjugate("be", "past", "third", "singular", profile)
|
|
if !str_eq(r2, "fu") {
|
|
println("FAIL: fro copula past 3sg: expected 'fu' got '" + r2 + "'")
|
|
} else {
|
|
println("PASS: fro copula past 3sg")
|
|
}
|
|
|
|
// "avoir" (to have) present 1sg -> "ai"
|
|
let r3: String = morph_conjugate("avoir", "present", "first", "singular", profile)
|
|
if !str_eq(r3, "ai") {
|
|
println("FAIL: fro avoir present 1sg: expected 'ai' got '" + r3 + "'")
|
|
} else {
|
|
println("PASS: fro avoir present 1sg")
|
|
}
|
|
|
|
// "avoir" past 3sg -> "ot"
|
|
let r4: String = morph_conjugate("avoir", "past", "third", "singular", profile)
|
|
if !str_eq(r4, "ot") {
|
|
println("FAIL: fro avoir past 3sg: expected 'ot' got '" + r4 + "'")
|
|
} else {
|
|
println("PASS: fro avoir past 3sg")
|
|
}
|
|
|
|
// morph_pluralize: fusional fallback returns noun unchanged
|
|
let r5: String = morph_pluralize("mur", profile)
|
|
if !str_eq(r5, "mur") {
|
|
println("FAIL: fro pluralize fallback: expected 'mur' got '" + r5 + "'")
|
|
} else {
|
|
println("PASS: fro pluralize fallback")
|
|
}
|
|
}
|
|
|
|
test_fro()
|