go-sqlcmd icon indicating copy to clipboard operation
go-sqlcmd copied to clipboard

The TestCmd pattern does not provide functionality to validate output

Open stuartpa opened this issue 2 years ago • 0 comments

Currently the Testcmd function just executes a command, but doesn't allow for further verification that the output generated was expected

cmdparser.TestSetup(t)
cmdparser.TestCmd[*AddEndpoint]()
cmdparser.TestCmd[*AddContext]("--endpoint endpoint")
cmdparser.TestCmd[*UseContext]("--name context")

Provide a pattern that enables TestCmd to validated the output was as expected, maybe an array/slice of RegExs that must validate?

stuartpa avatar Feb 11 '23 10:02 stuartpa