Codebase list ffuf / dfa9154 pkg / input / wordlist_test.go
dfa9154

Tree @dfa9154 (Download .tar.gz)

wordlist_test.go @dfa9154raw · 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")
	}
}