18 lines
431 B
C#
18 lines
431 B
C#
using TermRemoteCtl.Agent.History;
|
|
|
|
namespace TermRemoteCtl.Agent.Tests.History;
|
|
|
|
public class TerminalRingBufferTests
|
|
{
|
|
[Fact]
|
|
public void GetSnapshotLines_Evicts_Oldest_Lines_When_Line_Limit_Is_Exceeded()
|
|
{
|
|
var buffer = new TerminalRingBuffer(3);
|
|
|
|
buffer.Append("one\n");
|
|
buffer.Append("two\nthree\nfour\n");
|
|
|
|
Assert.Equal(["two", "three", "four"], buffer.GetSnapshotLines());
|
|
}
|
|
}
|