github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/test/integration/help_int_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 6 "github.com/ActiveState/cli/internal/testhelpers/e2e" 7 "github.com/ActiveState/cli/internal/testhelpers/suite" 8 "github.com/ActiveState/cli/internal/testhelpers/tagsuite" 9 "github.com/ActiveState/termtest" 10 ) 11 12 type HelpIntegrationTestSuite struct { 13 tagsuite.Suite 14 } 15 16 func TestHelpIntegrationTestSuite(t *testing.T) { 17 suite.Run(t, new(HelpIntegrationTestSuite)) 18 } 19 20 func (suite *HelpIntegrationTestSuite) TestCommandListing() { 21 suite.OnlyRunForTags(tagsuite.Help) 22 ts := e2e.New(suite.T(), false) 23 defer ts.Close() 24 25 cp := ts.SpawnWithOpts(e2e.OptArgs("--help"), e2e.OptTermTest(termtest.OptCols(80))) 26 cp.Expect("Usage:") 27 cp.Expect("Environment Setup:") 28 cp.Expect("Environment Usage:") 29 cp.Expect("Project Usage:") 30 cp.Expect("Package Management:") 31 cp.Expect("Platform:") 32 cp.Expect("Version Control:") 33 cp.Expect("Automation:") 34 cp.Expect("Utilities:") 35 cp.Expect(" remove") // wrapped on word, not character 36 cp.Expect("Flags:") 37 }