Skip to content

Commit

Permalink
improved 189s tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trullock committed Mar 15, 2021
1 parent 4164a21 commit 908844e
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/NUglify.Tests/JavaScript/Bugs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
8 changes: 7 additions & 1 deletion src/NUglify.Tests/NUglify.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,9 @@
<Content Include="TestData\JS\Expected\BlockOpts\ReturnLiteral.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\JS\Expected\Bugs\Bug189Important.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\JS\Expected\Bugs\Bug197.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand All @@ -454,7 +457,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\JS\Expected\Bugs\Bug189.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\JS\Expected\Bugs\Bug199JSON.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down Expand Up @@ -2765,6 +2768,9 @@
<Content Include="TestData\JS\Input\Bugs\Bug138.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\JS\Input\Bugs\Bug189Important.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\JS\Input\Bugs\Bug197.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
4 changes: 4 additions & 0 deletions src/NUglify.Tests/TestData/JS/Expected/Bugs/Bug189.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
let x = 1
// a comment
// another comment
//! important comment
/*!
another important comment
*/;
let y = 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let x = 1
//! important comment
/*!
another important comment
*/;
let y = 2
4 changes: 4 additions & 0 deletions src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
let x = 1; // a comment
// another comment
//! important comment
/*!
another important comment
*/
let y = 2;
7 changes: 7 additions & 0 deletions src/NUglify.Tests/TestData/JS/Input/Bugs/Bug189Important.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let x = 1; // a comment
// another comment
//! important comment
/*!
another important comment
*/
let y = 2;

0 comments on commit 908844e

Please sign in to comment.