@Test
	@SuppressWarnings("resource")
	public void testSimulateWindowsPtyStartCmd() throws Exception {
		terminalService = addPlugin(tool, TerminalPlugin.class);

		try (DefaultTerminal term = (DefaultTerminal) terminalService
				.createNullTerminal(Charset.forName("UTF-8"), buf -> {
				})) {
			term.setFixedSize(80, 25);

			send(term,
				csi('J', 2), HIDE_CURSOR, csi('m'), csi('H'),
				StringUtils.repeat("\r\n", 32), // for a 25-line terminal? No matter.
				csi('H'),
				title("C:\\Windows\\system32\\cmd.exe\0"),
				SHOW_CURSOR, HIDE_CURSOR,
				// Line 1: Length is 43
				"Microsoft Windows [Version XXXXXXXXXXXXXXX]",
				csi('X', 37), csi('C', 37), "\r\n", // 37 + 43 = 80
				// Line 2: Length is 52
				"(c) 20XX Microsoft Corporation. All rights reserved.",
				csi('X', 28), csi('C', 28), "\r\n", // 28 + 52 = 80
				// Line 3: Blank
				csi('X', 80), csi('C', 80), "\r\n", // 80 + 0 = 80
				// Line 4: No X or C sequences. Probably because shorter to put literal "  "
				"C:\\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX> ");
			send(term, " ");
			send(term, "\r\n");
			send(term,
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",
				csi('X', 80), csi('C', 80), "\r\n",

				csi('X', 80), csi('C', 80),
				csi('H', 4, 79),
				SHOW_CURSOR);

			assertEquals(
				"C:\\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>  ",
				term.getLineText(3));
			assertEquals(78, term.getCursorColumn());
			assertEquals(3, term.getCursorRow());
		}
	}
The echo command itself pays no heed to the terminal width. Wrapping is purely
terminal side.
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/plugin/core/terminal/TerminalProviderTest.java