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") } }