diff options
Diffstat (limited to 'tests/gobang.go')
-rw-r--r-- | tests/gobang.go | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/tests/gobang.go b/tests/gobang.go index 7391475..e0fde2f 100644 --- a/tests/gobang.go +++ b/tests/gobang.go @@ -28,20 +28,43 @@ func test_Heredoc() { and end `) - expected := ` Start - and - end -` + expected := " Start\n and\n end\n" TAssertEqual(given, expected) }) - Testing("removes ALL tabs", func() { - given := Heredoc(` + Testing("removes only indenting tabs", func() { + given1 := Heredoc(` Tab here> <within the line `) + const expected1 = "Tab here> <within the line\n" + + given2 := Heredoc(` + some + uneven + indentation + `) + const expected2 = "some\n\tuneven\n\t\tindentation\n" + + given3 := Heredoc(` + some + mixed + indentation + `) + const expected3 = "\tsome\n mixed\n\t\tindentation\n" + + TAssertEqual(given1, expected1) + TAssertEqual(given2, expected2) + TAssertEqual(given3, expected3) + }) - expected := "Tab here><within the line\n" + Testing("empty lines are removed", func() { + given := Heredoc(` + line 1 + + line 2 + `) + const expected = "line 1\n\nline 2\n" TAssertEqual(given, expected) }) |