Skip to content

Commit eb414bf

Browse files
committed
Add a little test
1 parent f70473c commit eb414bf

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

command/pr_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,10 @@ func TestPRView_branchWithOwnerArg(t *testing.T) {
362362
url := seenCmd.Args[len(seenCmd.Args)-1]
363363
eq(t, url, "https://github.com/hubot/REPO/pull/23")
364364
}
365+
366+
func TestReplaceExcessiveWhitespace(t *testing.T) {
367+
eq(t, replaceExcessiveWhitespace("hello\ngoodbye"), "hello goodbye")
368+
eq(t, replaceExcessiveWhitespace(" hello goodbye "), "hello goodbye")
369+
eq(t, replaceExcessiveWhitespace("hello goodbye"), "hello goodbye")
370+
eq(t, replaceExcessiveWhitespace(" hello \n goodbye "), "hello goodbye")
371+
}

0 commit comments

Comments
 (0)