Codebase list ffuf / d6adb1f7-bdf7-48e7-b315-1cbe9654e1ef/main pkg / input / wordlist_test.go
d6adb1f7-bdf7-48e7-b315-1cbe9654e1ef/main

Tree @d6adb1f7-bdf7-48e7-b315-1cbe9654e1ef/main (Download .tar.gz)

wordlist_test.go @d6adb1f7-bdf7-48e7-b315-1cbe9654e1ef/mainraw · 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")
	}
}