Skip to content

Commit d61cea7

Browse files
committed
Add test that the data we defined is expected
1 parent 2907ea9 commit d61cea7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/libraries/System.Console/tests/TermInfo.Unix.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ public void TermInfoVerification(string termToTest, string expectedForeground, s
103103
}
104104
}
105105

106+
[Fact]
107+
[PlatformSpecific(TestPlatforms.AnyUnix)] // Tests TermInfo
108+
public void TermInfoClearIncludesE3WhenExpected()
109+
{
110+
// XTerm defines E3 for clearing scrollback buffer and tmux does not.
111+
// This can't be added to TermInfoVerification because xterm-256color sometimes has E3 defined (e.g. on Ubuntu but not macOS)
112+
Assert.Equal("\u001B[H\u001B[2J\u001B[3J", new XTermData().TerminalDb.Clear);
113+
Assert.Equal("\u001B[H\u001B[J", new TmuxData().TerminalDb.Clear);
114+
}
115+
106116
[Fact]
107117
[PlatformSpecific(TestPlatforms.OSX)] // The file being tested is available by default only on OSX
108118
public void EmuTermInfoDoesntBreakParser()

0 commit comments

Comments
 (0)