microsoft / go-sqlcmd

The new sqlcmd, CLI for SQL Server and Azure SQL (winget install sqlcmd / sqlcmd create mssql / sqlcmd open ads)
https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility
MIT License
325 stars 57 forks source link

feat:Add -P -y -Y flags #369

Closed shueybubbles closed 1 year ago

shueybubbles commented 1 year ago

Fixes #365 Fixes #196 Fixes #362 I've also standardized more of the invalid flag error messages and replaced the default Cobra errors with localizable errors prefixed with Sqlcmd:

shueybubbles commented 1 year ago

@apoorvdeshmukh How do I fix this test?

  {
   name:     "existing key",
   key:      "'-w %d': value must be greater than 8 and less than 65536.",
   expected: "k",
   ok:       true,
  },

In reply to: 1579265257

apoorvdeshmukh commented 1 year ago

@apoorvdeshmukh How do I fix this test?

  {
   name:     "existing key",
   key:      "'-w %d': value must be greater than 8 and less than 65536.",
   expected: "k",
   ok:       true,
  },

In reply to: 1579265257

I had a look at the test which is failing. After running the go generate command, the catalog.go gets built and the map is generated again. The key which the testcase is trying to look for doesn't exist in the map and hence it is failing. It looks for existing key and then looks for it's index in the dictionary and uses the corresponding data as expected value. This testcase may need modifications if the index of the key gets changed.