ffuff/pkg/input/wordlist_test.go
2022-01-22 19:52:27 +02:00

22 lines
415 B
Go

package input
import (
"testing"
)
func TestStripCommentsIgnoresCommentLines(t *testing.T) {
text, _ := stripComments("# text")
if text != "" {
t.Errorf("Returned text was not a blank string")
}
}
func TestStripCommentsStripsCommentAfterText(t *testing.T) {
text, _ := stripComments("text # comment")
if text != "text" {
t.Errorf("Comment was not stripped or pre-comment text was not returned")
}
}