Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2021-04-23 14:17:44 +0000
committerJonah Graham2021-04-24 01:24:45 +0000
commit3e29cd65252a33504eceb80273c70cc57bd377ea (patch)
tree9d61a447fdc41afa474e4bed031791ff76052de7
parenta14c962ff2480cd2c0bd81adb2b66016b0f26a5d (diff)
downloadorg.eclipse.cdt-3e29cd65252a33504eceb80273c70cc57bd377ea.tar.gz
org.eclipse.cdt-3e29cd65252a33504eceb80273c70cc57bd377ea.tar.xz
org.eclipse.cdt-3e29cd65252a33504eceb80273c70cc57bd377ea.zip
Bug 341721: Test for rename terminal escape sequence
-rw-r--r--terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java b/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java
index e4c4e43f2bf..32995d2bb6d 100644
--- a/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java
+++ b/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java
@@ -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()));
+ }
+
}

Back to the top