You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a script contains comments directly followed by or preceded by a GO statement, the script will not split into commands properly and does not remove the GO. This can be remedied by introducing whitespace around the GO, but as this is valid sql syntax this whitespace should not be necessary.
Code to reproduce:
var sut = new SqlCommandSplitter();
var commands = sut.SplitScriptIntoCommands("/*comment*/GO--comment").ToArray();
var expectedResult = new string[] { "/*comment*/", "--comment"};
Debug.Assert(Enumerable.SequenceEqual(commands, expectedResult));
Expected behavior:
As this is valid sql syntax, the GO should be removed and the resulting commands should be parsed as in expectedResult.
Actual behavior:
Fails, as the SplitScriptIntoCommands function returns the entire string, including the GO, as one command.
The text was updated successfully, but these errors were encountered:
If a script contains comments directly followed by or preceded by a GO statement, the script will not split into commands properly and does not remove the GO. This can be remedied by introducing whitespace around the GO, but as this is valid sql syntax this whitespace should not be necessary.
Code to reproduce:
Expected behavior:
As this is valid sql syntax, the GO should be removed and the resulting commands should be parsed as in expectedResult.
Actual behavior:
Fails, as the SplitScriptIntoCommands function returns the entire string, including the GO, as one command.
The text was updated successfully, but these errors were encountered: