Skip to content

Commit

Permalink
Fix parser fixer test
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbey committed Nov 19, 2024
1 parent 6b9d9f0 commit 01d7500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ else if (buffer)
}
if (content.contains("{") && !content.contains("}"))
{
return value + magicToken + "}#";
return (value.contains(magicToken) ? value : value + magicToken) + "}#";
}
if (content.contains("{") && content.contains("}"))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public void testArithmetic()
public void testIsland()
{
Assert.assertEquals("#MaGiCToKeN{}#", fixCode("#"));
Assert.assertEquals("#>{}#", fixCode("#>"));
Assert.assertEquals("#>{}#", fixCode("#>{"));
Assert.assertEquals("#>{MaGiCToKeN}#", fixCode("#>"));
Assert.assertEquals("#>{MaGiCToKeN}#", fixCode("#>{"));
Assert.assertEquals("#>{}#", fixCode("#>{}"));
Assert.assertEquals("#>{a::A.t}#->fil()", fixCode("#>{a::A.t}#->fil"));
Assert.assertEquals("#>{a::A.t}#->x(#>{}#)", fixCode("#>{a::A.t}#->x(#>"));
Assert.assertEquals("#>{a::A.t}#->x(#>{MaGiCToKeN}#)", fixCode("#>{a::A.t}#->x(#>"));
Assert.assertEquals("#>{a::A.t}#->x(#>{a::A.MaGiCToKeN}#)", fixCode("#>{a::A.t}#->x(#>{a::A."));
}

Expand Down

0 comments on commit 01d7500

Please sign in to comment.