Codebase list ffuf / 175bcd1 pkg / input / wordlist_test.go
175bcd1

Tree @175bcd1 (Download .tar.gz)

wordlist_test.go @175bcd1raw · history · blame

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