github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/lib/http/template_test.go (about)

     1  package http
     2  
     3  import (
     4  	"strings"
     5  	"testing"
     6  )
     7  
     8  func TestHelpPrefixTemplate(t *testing.T) {
     9  	// This test assumes template variables are placed correctly.
    10  	const testPrefix = "template-help-test"
    11  	helpMessage := TemplateHelp(testPrefix)
    12  	if !strings.Contains(helpMessage, testPrefix) {
    13  		t.Fatal("flag prefix not found")
    14  	}
    15  }