diff --git a/src/NUglify.Tests/JavaScript/Bugs.cs b/src/NUglify.Tests/JavaScript/Bugs.cs index dda5105e..5372bf4d 100644 --- a/src/NUglify.Tests/JavaScript/Bugs.cs +++ b/src/NUglify.Tests/JavaScript/Bugs.cs @@ -170,6 +170,13 @@ public void Bug189() TestHelper.Instance.RunTest("-pretty -comments:all"); } + + [Test] + public void Bug189Important() + { + TestHelper.Instance.RunTest("-pretty -comments:important"); + } + [Test] public void Bug197() { diff --git a/src/NUglify.Tests/NUglify.Tests.csproj b/src/NUglify.Tests/NUglify.Tests.csproj index 758527eb..095ed992 100644 --- a/src/NUglify.Tests/NUglify.Tests.csproj +++ b/src/NUglify.Tests/NUglify.Tests.csproj @@ -476,6 +476,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -501,7 +504,7 @@ PreserveNewest - PreserveNewest + PreserveNewest PreserveNewest @@ -2842,6 +2845,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189.js b/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189.js index 4097c06a..3282d162 100644 --- a/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189.js +++ b/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189.js @@ -1,4 +1,8 @@ let x = 1 // a comment // another comment +//! important comment +/*! + another important comment + */; let y = 2 diff --git a/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189Important.js b/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189Important.js new file mode 100644 index 00000000..230f3b95 --- /dev/null +++ b/src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189Important.js @@ -0,0 +1,6 @@ +let x = 1 +//! important comment +/*! + another important comment + */; +let y = 2 diff --git a/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189.js b/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189.js index ee5fcf3e..9e4e66ec 100644 --- a/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189.js +++ b/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189.js @@ -1,3 +1,7 @@ let x = 1; // a comment // another comment +//! important comment +/*! + another important comment + */ let y = 2; diff --git a/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189Important.js b/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189Important.js new file mode 100644 index 00000000..9e4e66ec --- /dev/null +++ b/src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189Important.js @@ -0,0 +1,7 @@ +let x = 1; // a comment +// another comment +//! important comment +/*! + another important comment + */ +let y = 2;