Skip to content

Commit

Permalink
Reorganize test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mooniker committed Oct 13, 2019
1 parent 73d098d commit eac3faa
Show file tree
Hide file tree
Showing 5 changed files with 554 additions and 295 deletions.
3 changes: 1 addition & 2 deletions romanize.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
const {
searchJamo,
syllableParser,
romanize,
romanizeWord
} = require("./romanize");
const words = Object.entries(require("./test-words").words);
const words = Object.entries(require("./test").words);

describe("romanizeWord function", () => {
describe("should romanize simple words", () => {
Expand Down
293 changes: 0 additions & 293 deletions test-words.js

This file was deleted.

15 changes: 15 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
let words = require("./words.json");
let sentences = require("./sentences.json");

try {
const { addExtra } = require("./extra");
words = addExtra("words", words);
sentences = addExtra("sentences", sentences);
} catch (e) {
// don't use extra
}

module.exports = {
words,
sentences
};
33 changes: 33 additions & 0 deletions test/sentences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"한국은 네 계절이 뚜렷하다": {
"meaningEng": "Korea has four distinct seasons",
"IPA": "han.ɡu.ɡɯn ne̞ cje̞.dʑʌ.ɾi t͈u.ɾjʌ.tʰa.da",
"RR": "Hangugeun ne gyejeori tturyeotada",
"RRT": "Hangug-eun ne gyejeol-i ttulyeoshada",
"mr": "Hangugŭn ne kyejŏri tturyŏthada",
"yale": "Hānkuk un nēy kyēycel i ttwulyes hata",
"SKATS": "jef lhl kdf ftu lsu ptv ku bbh vsg je be"
},
"사계절이 뚜렷하다": {
"meaningEng": "Four seasons are distinct",
"RR": "Sagyejeori tturyeotada",
"RRT": "Sa-gye-jeol-i ttu-lyeos-ha-da",
"ck": "Сагеджори ттурётхада",
"ckr": "Sagedzhori tturyothada"
},
"원하시는 선 색깔과 굵기에 체크하시면 됩니다": {
"meaningEng": "Just check the line color and width you want",
"IPA": "wʌn.ɦa.ɕi.nɯn sʌn sɛ̝k̚.k͈al.ɡwa kul.c͈i.e̞ tɕʰe̞.kʰɯ.ɦa.ɕi.mjʌn twe̞m.ɲi.da",
"RR": "Wonhasineun seon saekkkalgwa gulkkie chekeuhasimyeon doemnida",
"RRT": "Wonhasineun seon saegkkalgwa gulggie chekeuhasimyeon doebnida",
"mr": "Wŏnhasinŭn sŏn saekkalgwa kulkie ch'ek'ŭhasimyŏn toemnida",
"yale": "Wēn hasinun sen sayk.kkal kwa kwulk.ki ey cheykhu hasimyen toypnita",
"SKATS": "khtf je gu fdf gtf geul llev lae lhvl lu ktu ctu xd je gu msf bauw fu be",
"ck": "Вонхасинын сон сэкккальгва куккие чхекхыхасимён твемнида",
"ckr": "Vonhasinyn son sèkkal'gva kukkie chhekhyhasimyon tvemnida"
},
"김치가 맛있다": {
"RR": "Kimchiga masitta",
"SKATS": "LUM CU LE MEG KUGG BE"
}
}
Loading

0 comments on commit eac3faa

Please sign in to comment.