@Test
	public void testEndAlignWithNoNullTermination() throws Exception {

		Program testProgram = buildProgram("finder.exe", false);

		Listing listing = testProgram.getListing();
		AddressSpace space = testProgram.getLanguage().getAddressFactory().getDefaultAddressSpace();

		String[] existingStrings = new String[] { "TLOSS error\\r\\n", "SING error\\r\\n",
			"Microsoft Visual C++ Runtime Library", "GetLastActivePopup" };
		int[] offsets = new int[] { 0x300010d0, 0x300010e0, 0x30001348, 0x300013ac };

		Address[] existingAddresses = new Address[offsets.length];

		for (int i = 0; i < offsets.length; i++) {
			existingAddresses[i] = addr(space, offsets[i]);
		}

		Data dataHere;

		// Verify these strings do not exist prior to running the Strings Analyzer
		for (Address currAddress : existingAddresses) {
			dataHere = listing.getDefinedDataAt(currAddress);
			assertNull(dataHere);
		}

		AutoAnalysisManager manager = AutoAnalysisManager.getAnalysisManager(testProgram);

		StringsAnalyzer analyzer = new StringsAnalyzer();
		analyzer.setStringEndAlignment(4);
		analyzer.setRequireNullTermination(false);
		analyzer.added(testProgram, null, monitor, manager.getMessageLog());

		String stringHere;

		for (int i = 0; i < existingStrings.length; i++) {
			// Verify string is actually there
			dataHere = listing.getDefinedDataAt(existingAddresses[i]);
			assertNotNull(dataHere);
			stringHere = dataHere.getDefaultValueRepresentation();

			// String will look something like --> "My String",00
			String buildMyString = "\"" + existingStrings[i] + "\"";
			assertEquals(buildMyString, stringHere);
		}
	}
Test that the "end alignment" parameter has no effect when the "Require null termination
for string" option is unchecked. That is, created strings either have ONE null terminator
or none (there are no extra padding bytes added to the end).

@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringsAnalyzerTest.java