protected void assertEditorContentsSame(String expectedText) {
		assertNotNull("Editor not opened and initialized", editorTextArea);

		final String[] box = new String[1];
		runSwing(() -> box[0] = editorTextArea.getText());

		if (!expectedText.equals(box[0])) {
//			// let's examine these strings a bit closer, as something in the error reporting
//			// is not quite right
//			System.err.println("length of strings: " + expectedText.length() + " and " +
//				box[0].length());
//
//			int start = 0;
//			StringDiff[] diffs = StringUtilities.getDiffs(expectedText, box[0]);
//			for (StringDiff diff : diffs) {
//				boolean isInsert = diff.insertData != null;
//				if (isInsert) {
//					System.err.println("\n\n>>>\t\tdiff context:\t\t<<<\n" +
//						box[0].substring(start, diff.pos1 - diff.insertData.length()));
//					System.err.println("\n\n>>>>\tinserted value:\t\t<<<\n" + diff.insertData);
//				}
//				else {
//					System.err.println("\n\n>>>\t\tdiff context:\t\t<<<\n" +
//						box[0].substring(start, diff.pos1));
//					System.err.println("\n\n>>>>\tdeleted value:\t\t<<<\n" +
//						expectedText.substring(diff.pos1, diff.pos2));
//				}
//			}
//
			System.err.println("The editor's text does not contain the expected text");
			printChars(expectedText, box[0]);
			Assert.fail("The editor's text does not contain the expected text");
		}

		assertEquals("The editor's text does not contain the expected text", expectedText, box[0]);
	}
Run the last script by pressing the last script button and return output.

@param taskName name for the task listener
@return script output written to the console
@throws Exception on failure, e.g. timeout
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java