Default targets to stdin and abstract file handling

This commit is contained in:
Tomás Senart
2013-09-11 14:10:45 +01:00
parent 3059854751
commit 7cd13327c6
6 changed files with 50 additions and 73 deletions

View File

@@ -6,9 +6,9 @@ import (
"testing"
)
func TestReadTargets(t *testing.T) {
func TestNewTargetsFrom(t *testing.T) {
lines := bytes.NewBufferString("GET http://lolcathost:9999/\n\n // HEAD http://lolcathost.com this is a comment \nHEAD http://lolcathost:9999/\n")
targets, err := readTargets(lines)
targets, err := NewTargetsFrom(lines)
if err != nil {
t.Fatalf("Couldn't parse valid source: %s", err)
}