diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index f0d18dc..56dded9 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -1,9 +1,7 @@ name: pr-validation on: - pull_request: - branches: - - main + pull_request jobs: build: diff --git a/Test/SqlDom/ParsingEntryPointsTests.cs b/Test/SqlDom/ParsingEntryPointsTests.cs index 5970c04..44a573d 100644 --- a/Test/SqlDom/ParsingEntryPointsTests.cs +++ b/Test/SqlDom/ParsingEntryPointsTests.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.IO; using System.Text; +using System.Text.RegularExpressions; using Microsoft.SqlServer.TransactSql.ScriptDom; using Microsoft.VisualStudio.TestTools.UnitTesting; using SqlStudio.Tests.AssemblyTools.TestCategory; @@ -67,7 +68,9 @@ void TestEntryPoint(EntryPoint entryPoint, SqlScriptGenerator scriptGen, s reader.Close(); Assert.IsNotNull(actual); Assert.AreEqual(0, errors.Count); - Assert.AreEqual(script, GenerateSource(scriptGen, actual)); + string normalizedScript = Regex.Replace(script, @"\r\n|\n\r|\n|\r", Environment.NewLine); + string normalizedActual = Regex.Replace(GenerateSource(scriptGen, actual), @"\r\n|\n\r|\n|\r", Environment.NewLine); + Assert.AreEqual(normalizedScript, normalizedActual); } }