github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/core/commands/tour_test.go (about)

     1  package commands
     2  
     3  import (
     4  	"bytes"
     5  	"testing"
     6  
     7  	"github.com/ipfs/go-ipfs/tour"
     8  )
     9  
    10  func TestParseTourTemplate(t *testing.T) {
    11  	topic := &tour.Topic{
    12  		ID: "42",
    13  		Content: tour.Content{
    14  			Title: "IPFS CLI test files",
    15  			Text: `
    16  Welcome to the IPFS test files
    17  This is where we test our beautiful command line interfaces
    18  		`,
    19  		},
    20  	}
    21  	buf := new(bytes.Buffer)
    22  	err := fprintTourShow(buf, topic)
    23  	if err != nil {
    24  		t.Fatal(err)
    25  	}
    26  	t.Log(buf.String())
    27  }