(test)(pronouns) ensure that pronouns.null.morphemes contains known morphemes

This commit is contained in:
Valentyne Stigloher 2024-10-07 14:54:12 +02:00
parent 755b9d16cd
commit 75c7b8889a
4 changed files with 18 additions and 13 deletions

View File

@ -23,11 +23,7 @@ pronouns:
description: '대명사 없음 / 무효 대명사 / 자기 이름'
history: '어떤 사람들은 대명사를 사용하지 않고 대신 이름, 이니셜 또는 수동태로 대명사를 생략하는 것을 선호합니다({https://web.archive.org/web/20230326021305/https://www.lgbtqia.wiki/wiki/Nullpronominal=널 의례적인}.'
morphemes:
pronoun_subject: '#'
pronoun_object: '#'
possessive_determiner: '#것'
possessive_pronoun: '#꺼'
reflexive: '#자기'
pronoun: '#'
examples: [':안드레아', ':S']
emoji:
description: '이모티콘 자체 대명사'

View File

@ -24,7 +24,6 @@ pronouns:
accusative: '#'
pronominal_poss: '#'
predicative_poss: '#e'
reflexive: '#zelf'
examples: [':Andrea', ':S']
emoji:
description: 'Emojizelf voornaamwoorden'
@ -34,7 +33,6 @@ pronouns:
accusative: '#'
pronominal_poss: '#'
predicative_poss: '#e'
reflexive: '#zelf'
examples: ['💫', '💙']
others: 'Andere voornaamwoorden'
threeForms: true

View File

@ -20,12 +20,6 @@ pronouns:
null:
description: 'No pronouns / null pronouns / pronounless / nameself'
history: 'Some people prefer not using any pronouns, instead being referred by name, initial, or by omitting pronouns with passive voice, see: {https://web.archive.org/web/20230326021305/https://www.lgbtqia.wiki/wiki/Nullpronominal=nullpronominal}.'
morphemes:
pronoun_subject: '#'
pronoun_object: '#'
possessive_determiner: '#''s'
possessive_pronoun: '#''s'
reflexive: '#self'
examples: [':Andrea', ':S']
emoji: false
others: 'Other pronouns'

View File

@ -0,0 +1,17 @@
import { describe, expect, test } from 'vitest';
import type { Config } from '~/locale/config.ts';
import allLocales from '~/locale/locales.ts';
import { loadSumlFromBase } from '~/server/loader.ts';
describe.each(allLocales)('config for $code', async ({ code }) => {
const config = loadSumlFromBase(`locale/${code}/config`) as Config;
const { default: morphemes } = await import(`../../locale/${code}/pronouns/morphemes.ts`);
test('pronouns.null.morphemes contain valid morphemes', () => {
if (!config.pronouns.null || config.pronouns.null.morphemes === undefined) {
return;
}
expect(morphemes).toEqual(expect.arrayContaining(Object.keys(config.pronouns.null.morphemes)));
});
});