Skip to content

Commit

Permalink
add example of http fetch to README
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasepe committed May 21, 2021
1 parent fed3b9a commit db0b429
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/template/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,22 @@ import (
"errors"
"io"
"testing"

"github.com/google/go-cmp/cmp"
)

func TestMarks(t *testing.T) {
got, err := Marks("{{ one }} - {{two}} and {{ three }}", "{{", "}}")
if err != nil {
t.Fatal(err)
}

want := []string{"one", "two", "three"}
if !cmp.Equal(got, want) {
t.Fatalf("got [%v] wants [%v]", got, want)
}
}

func TestExecuteFunc(t *testing.T) {
testExecuteFunc(t, "", "")
testExecuteFunc(t, "a", "a")
Expand Down

0 comments on commit db0b429

Please sign in to comment.