/* Unit-test the Spanish conjugation repairs against MEASURED NLLB output — no model needed. Every 'from' is a non-word (safe by construction); every real form must pass untouched. */ const S = require('./spa-variants.js'); let pass = 0, fail = 0; const t = (label, input, want) => { const got = S.toChurchRegister(input); const ok = got === want; console.log((ok ? ' PASS ' : ' FAIL ') + label + (ok ? '' : '\n got "' + got + '"\n want "' + want + '"')); ok ? pass++ : fail++; }; console.log('\nMEASURED NON-WORDS — must be repaired'); t('bendecemos (transcript 2026-09-13)', 'Te bendecemos, Señor.', 'Te bendecimos, Señor.'); t('bendicemos (transcript)', 'Bendicemos el nombre de Jesús.', 'Bendecimos el nombre de Jesús.'); t('bendimos (transcript)', 'Bendimos su nombre.', 'Bendecimos su nombre.'); t('bendicimos', 'Hoy bendicimos al Señor.', 'Hoy bendecimos al Señor.'); t('bendico', 'Yo te bendico.', 'Yo te bendigo.'); t('bendecen', 'Ellos bendecen a Dios.', 'Ellos bendicen a Dios.'); t('bendiciré', 'Bendiciré al Señor.', 'Bendeciré al Señor.'); t('benditaremos / bendiciremos', 'Bendiciremos tu nombre. Benditaremos tu nombre.', 'Bendeciremos tu nombre. Bendeciremos tu nombre.'); t('bendíelo -> 1pl hortative, NOT the tú imperative', '¡Bendíelo!', '¡Bendigámoslo!'); t('bendíalo', 'Bendíalo, pueblo.', 'Bendigámoslo, pueblo.'); t('maldiciré', 'No maldiciré.', 'No maldeciré.'); t('pedamos', 'Pedamos en su nombre.', 'Pidamos en su nombre.'); t('ungas / undémonos / redémonos', 'Que ungas a tu siervo. Undémonos, Señor. Redémonos, Señor.', 'Que unjas a tu siervo. Úngenos, Señor. Redímenos, Señor.'); t('dás', 'Tú nos dás vida.', 'Tú nos das vida.'); t('capital preserved at sentence start', 'Bendecemos tu nombre.', 'Bendecimos tu nombre.'); console.log('\nREAL FORMS — must not be touched'); for (const real of ['Bendecimos su nombre.', 'Dios te bendiga.', 'Bendice, alma mía, al Señor.', 'Bendito sea el nombre del Señor.', 'Bendiciones para todos.', 'La bendición de Dios.', 'Él nos bendijo.', 'Bendecirá a su pueblo.', 'Bendiciendo al Señor.', 'Yo bendigo al Señor.', 'Ustedes bendicen a Dios.', 'Pidamos con fe.', 'Nos das vida.', 'Úngenos con tu Espíritu.']) { t('untouched: ' + real, real, real); } console.log('\nEXISTING REGISTER PASS still runs'); t('rezar -> orar', 'Vamos a rezar juntos.', 'Vamos a orar juntos.'); console.log('\n' + pass + ' passed, ' + fail + ' failed'); process.exit(fail ? 1 : 0);