github.com/gopinath-langote/1build@v1.7.0/testing/fixtures/flag_version_fixtures.go (about) 1 package fixtures 2 3 import ( 4 "github.com/stretchr/testify/assert" 5 "testing" 6 ) 7 8 func featureFlagVersionTestData() []Test { 9 feature := "version" 10 return []Test{ 11 shouldPrintCurrentVersion(feature), 12 } 13 } 14 15 func shouldPrintCurrentVersion(feature string) Test { 16 return Test{ 17 Feature: feature, 18 Name: "shouldPrintCurrentVersion", 19 CmdArgs: Args("--version"), 20 Assertion: func(dir string, actualOutput string, t *testing.T) bool { 21 return assert.Contains(t, actualOutput, "1build version 1.4.0") 22 }, 23 } 24 }