Add: TypingTextManager - makeExaminationContents

This commit is contained in:
2019-06-20 23:56:28 +09:00
parent a5a0f9f759
commit a3fb4a57cd
4 changed files with 129 additions and 19 deletions
+20
View File
@@ -306,6 +306,26 @@ QUnit.test( "AccountValidator - isValidPlayerPW", function( assert ) {
let typingTextMan = new TypingTextManager();
let testContent = [ "ㅃ", "ㅂ", "ㅈ", "ㅉ", "ㄸ", "ㄷ", "ㄱ", "ㄲ", "ㅅ" ];
QUnit.test( "TypingTextManager - makeExaminationContents", function( assert ) {
var sentences = [
"냉면 / 김남천",
"",
"'냉면'이라는 말에 '평양'이 붙어서 '평양냉면'이라야 비로소 어울리는 격에 맞는 말이 되듯이 냉면은 평양에 있어 대표적인 음식이다. 언제부터 이 냉면이 평양에 들어왔으며 언제부터 냉면이 평안도 사람의 입에 가장 많이 기호에 맞는 음식물이 되었는지는 나 같은 무식쟁이에게는 알 수도 없고 또 알려고도 아니한다."
];
typingTextMan.init();
typingTextMan.makeExaminationContents(sentences);
let contents = typingTextMan.getContents();
assert.equal(contents[0], "냉면 / 김남천", "addTextArray - 1st line");
assert.equal(contents[1], "'냉면'이라는 말에 '평양'이 붙어서 ", "addTextArray - 2nd line");
assert.equal(contents[2], "'평양냉면'이라야 비로소 어울리는 격에 맞는 말이 ", "addTextArray - 3rd line");
assert.equal(contents[3], "되듯이 냉면은 평양에 있어 대표적인 음식이다. ", "addTextArray - 4th line");
assert.equal(contents[4], "언제부터 이 냉면이 평양에 들어왔으며 언제부터 냉면이 ", "addTextArray - 5th line");
assert.equal(contents[5], "평안도 사람의 입에 가장 많이 기호에 맞는 음식물이 ", "addTextArray - 6th line");
assert.equal(contents[6], "되었는지는 나 같은 무식쟁이에게는 알 수도 없고 또 ", "addTextArray - 7th line");
assert.equal(contents[7], "알려고도 아니한다.", "addTextArray - 8th line");
});
QUnit.test( "TypingTextManager - add", function( assert ) {
typingTextMan.init();
typingTextMan.add(testContent);