Skip to content

Commit e2283bf

Browse files
committed
Add comment linking test to the issue
1 parent c5be68e commit e2283bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/sqlcmd/main_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,17 @@ func TestQueryAndExit(t *testing.T) {
254254
}
255255
}
256256

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
257260
func TestExitOnError(t *testing.T) {
258261
args = newArguments()
259262
args.InputFile = []string{"testdata/select100.sql"}
260263
args.ErrorsToStderr = 0
261264
args.ExitOnError = true
265+
if canTestAzureAuth() {
266+
args.UseAad = true
267+
}
262268

263269
vars := sqlcmd.InitializeVariables(!args.DisableCmdAndWarn)
264270
setVars(vars, &args)

0 commit comments

Comments
 (0)