Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/Lua.Tests/LexerTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Lua.CodeAnalysis.Syntax;
using System.Text;

namespace Lua.Tests;

Expand Down Expand Up @@ -182,6 +183,21 @@ public void Test_If_Else()
CollectionAssert.AreEqual(expected, actual);
}

[Test]
public void Test_ManyComments()
{
var builder = new StringBuilder();

for (int i = 0; i < 1000; i++)
{
builder.AppendLine("--");
builder.AppendLine("--");
}

var many = builder.ToString();
GetTokens(many);
}

static SyntaxToken[] GetTokens(string source)
{
var list = new List<SyntaxToken>();
Expand Down