Skip to content

Commit 7272117

Browse files
authored
Update TestUtilities.cs
Signed-off-by: Zi Chen <13544267+zijchen@users.noreply.github.com>
1 parent 8727aa0 commit 7272117

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Test/SqlDom/TestUtilities.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,13 @@ public static TSqlFragment ParseStringNoErrors(TSqlParser parser, string source)
394394
}
395395

396396
public static TSqlFragment ParseString(TSqlParser parser, string source, out IList<ParseError> errors)
397-
{
397+
{
398+
#if NET
399+
// Convert line endings from \n to \r\n
400+
if (System.Environment.NewLine == "\n")
401+
source = source.ReplaceLineEndings("\r\n");
402+
#endif
403+
398404
TSqlFragment fragment;
399405
using (StringReader sr = new StringReader(source))
400406
{

0 commit comments

Comments
 (0)