Skip to content

Commit

Permalink
Add snapshot-style test
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoh committed Oct 6, 2023
1 parent c32cd85 commit 720ac81
Show file tree
Hide file tree
Showing 2 changed files with 62,994 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ internal class StringsTest {

@Test
fun testAllNames() {
val allNames = this::class.java.getResource("/allNames.txt")?.readText()!!
allNames.lines().forEach {
val current = it.toSnakeCase()
val others = listOf(it.toSnakeCaseV2(), it.toSnakeCaseV3())
if (others.any { it != current }) {
println("$it before: $current => ${others.toSet()}")
}
val allNames = this::class.java.getResource("/testOutput.txt")?.readText()!!
allNames.lines().filter { it.isNotBlank() }.forEach {
val split = it.split(',')
val input = split[0]
val expectation = split[1]
input.toSnakeCase() shouldBe expectation
}
}

Expand Down
Loading

0 comments on commit 720ac81

Please sign in to comment.