mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 341721: Test for rename terminal escape sequence
Change-Id: Id03f3d4361d0ac0ac0758c3f00eadbe2d6b568fc
This commit is contained in:
parent
a14c962ff2
commit
3e29cd6525
1 changed files with 14 additions and 0 deletions
|
@ -34,6 +34,10 @@ public class VT100EmulatorTest {
|
|||
private static final String CLEAR_CURSOR_TO_EOL = "\033[K";
|
||||
private static final String CURSOR_POSITION_TOP_LEFT = "\033[H";
|
||||
|
||||
private static String TITLE(String title) {
|
||||
return "\033]0;" + title + "\007";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cursor position to line/column. Note that this is the logical
|
||||
* line and column, so 1, 1 is the top left.
|
||||
|
@ -212,4 +216,14 @@ public class VT100EmulatorTest {
|
|||
assertAll(() -> assertCursorLocation(2, 1), () -> assertTextEquals(expected));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTitle() {
|
||||
run( //
|
||||
TITLE("TITLE1"), //
|
||||
"HELLO", //
|
||||
TITLE("TITLE2"));
|
||||
assertAll(() -> assertTextEquals("HELLO"),
|
||||
() -> assertEquals(List.of("TITLE1", "TITLE2"), control.getAllTitles()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue