Codebase list ffuf / 8504394e-3a95-4d37-be57-2f4a8e1b2560/upstream/1.5.0+git20221222.1.f713594 pkg / input / wordlist_test.go
8504394e-3a95-4d37-be57-2f4a8e1b2560/upstream/1.5.0+git20221222.1.f713594

Tree @8504394e-3a95-4d37-be57-2f4a8e1b2560/upstream/1.5.0+git20221222.1.f713594 (Download .tar.gz)

wordlist_test.go @8504394e-3a95-4d37-be57-2f4a8e1b2560/upstream/1.5.0+git20221222.1.f713594raw · 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")
	}
}