From bab7a2db2c84924c30d71d385a5c88499bd92f6d Mon Sep 17 00:00:00 2001 From: Nanai10a Date: Tue, 19 Jan 2021 13:56:09 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=E3=81=93=E3=82=93=E3=81=AA=E3=82=82?= =?UTF-8?q?=E3=82=93=E3=81=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../twomeat/cli/commands/ParseCommandTest.kt | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/cli_kt/app/src/test/kotlin/net/nanai10a/twomeat/cli/commands/ParseCommandTest.kt b/cli_kt/app/src/test/kotlin/net/nanai10a/twomeat/cli/commands/ParseCommandTest.kt index 9a2d919..3e76744 100644 --- a/cli_kt/app/src/test/kotlin/net/nanai10a/twomeat/cli/commands/ParseCommandTest.kt +++ b/cli_kt/app/src/test/kotlin/net/nanai10a/twomeat/cli/commands/ParseCommandTest.kt @@ -10,5 +10,52 @@ internal class ParseCommandTest { listOf("A", "falsis,", "devatio", "magnum", "eleates."), func("A falsis, devatio magnum eleates.") ) + + assertEquals( + listOf("When", "the", "ferengi", "resists", "for", "nowhere,", "all", "ships", "gather", "post-apocalyptic,", "clear", "nanomachines."), + func("When the ferengi resists for nowhere, all ships gather post-apocalyptic, clear nanomachines.") + ) + + assertEquals( + listOf("Happiness", "happens", "when", "you", "need", "extend", "so", "agreeable", "that", "whatsoever you are", "contacting", "is", "your", "vision."), + func("""Happiness happens when you need extend so agreeable that "whatsoever you are" contacting is your vision.""") + ) + + assertEquals( + listOf("a", "b", "c", "d"), + func("a b\tc d") + ) + + assertEquals( + listOf("a", "b"), + func("a \t\n\rb") + ) + + assertEquals( + listOf("a b"), + func("a\\ b") + ) + + assertEquals( + listOf(""), + func(" ") + ) + + assertEquals( + listOf("hey"), + func(""" + |hey + """.trimMargin("|")) + ) + + assertEquals( + listOf("hoge??", " ", "fuga??"), + func(""" + |hoge?? + |\  + |    + |fuga?? + """.trimMargin("|")) + ) } }