chore: Halkyon Learn moves into apps/learn
Its server, client, app and curator, and the tools that write its assets (maps, Anki fixtures, icons), as they are; paths are fixed in the commits that follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
11abd9afce
commit
649499be23
1 changed files with 0 additions and 0 deletions
37
apps/learn/halkyon_learn_curator/test/kana_test.dart
Normal file
37
apps/learn/halkyon_learn_curator/test/kana_test.dart
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import 'package:halkyon_learn_curator/src/japanese/kana.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('katakana becomes hiragana; the rest stays', () {
|
||||
expect(toHiragana('テレビ'), 'てれび');
|
||||
expect(toHiragana('カード'), 'かーど');
|
||||
expect(toHiragana('食べる'), '食べる');
|
||||
});
|
||||
|
||||
test('kana become Hepburn romaji, as people type them', () {
|
||||
expect(toRomaji('たべる'), 'taberu');
|
||||
expect(toRomaji('とうきょう'), 'toukyou');
|
||||
expect(toRomaji('しゃしん'), 'shashin');
|
||||
expect(toRomaji('きって'), 'kitte');
|
||||
expect(toRomaji('まっちゃ'), 'matcha');
|
||||
expect(toRomaji('カード'), 'kaado');
|
||||
expect(toRomaji('パーティー'), 'paatii');
|
||||
expect(toRomaji('ふぁいる'), 'fairu');
|
||||
expect(toRomaji('ぢ'), 'ji');
|
||||
expect(toRomaji('デュエット'), 'dyuetto');
|
||||
expect(toRomaji('フュージョン'), 'fyuujon');
|
||||
});
|
||||
|
||||
test('long vowels written once, where that differs', () {
|
||||
expect(withShortVowels('toukyou'), 'tokyo');
|
||||
expect(withShortVowels('kaado'), 'kado');
|
||||
expect(withShortVowels('oniisan'), 'onisan');
|
||||
expect(withShortVowels('taberu'), isNull);
|
||||
});
|
||||
|
||||
test('full-width letters and digits become the ones people type', () {
|
||||
expect(halfWidth('Tシャツ'), 'Tシャツ');
|
||||
expect(halfWidth('3D CD'), '3D CD');
|
||||
expect(halfWidth('東京'), '東京');
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue