We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5be68e commit e2283bfCopy full SHA for e2283bf
cmd/sqlcmd/main_test.go
@@ -254,11 +254,17 @@ func TestQueryAndExit(t *testing.T) {
254
}
255
256
257
+// Test to verify fix for issue: https://github.com/microsoft/go-sqlcmd/issues/98
258
+// 1. Verify when -b is passed in (ExitOnError), we don't always get an error (even when input is good)
259
+// 2, Verify when the input is actually bad, we do get an error
260
func TestExitOnError(t *testing.T) {
261
args = newArguments()
262
args.InputFile = []string{"testdata/select100.sql"}
263
args.ErrorsToStderr = 0
264
args.ExitOnError = true
265
+ if canTestAzureAuth() {
266
+ args.UseAad = true
267
+ }
268
269
vars := sqlcmd.InitializeVariables(!args.DisableCmdAndWarn)
270
setVars(vars, &args)
0 commit comments