Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: only pass lefthand whitespace delta to _handle_indentation #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

djangovanderheijden
Copy link

This fixes JUnit output in cases where the TAP file does not end with a trailing newline. It also improves behavior when tests are provided with an empty description which is technically allowed as per the TAP spec.

Take the following input file:

1..3
ok 1 Hello, world
ok 2 
ok 3 Hello, world

The resulting XML is as follows:

Before:

<?xml version="1.0" encoding="utf-8"?>
<testsuites disabled="0" errors="0" failures="2" tests="5" time="0.0">
	<testsuite disabled="0" errors="0" failures="2" name="..." skipped="0" tests="5" time="0" hostname="...">
		<testcase name="Hello, world"/>
		<testcase name="None">
			<failure type="failure" message=" (0)"/>
		</testcase>
		<testcase name="None"/>
		<testcase name="None">
			<failure type="failure" message=" (0)"/>
		</testcase>
		<testcase name="Hello, world"/>
	</testsuite>
</testsuites>

After:

<?xml version="1.0" encoding="utf-8"?>
<testsuites disabled="0" errors="0" failures="0" tests="3" time="0.0">
	<testsuite disabled="0" errors="0" failures="0" name="..." skipped="0" tests="3" time="0" hostname="...">
		<testcase name="Hello, world"/>
		<testcase name="None"/>
		<testcase name="Hello, world"/>
	</testsuite>
</testsuites>

…espace stripped from the lefthand side of the test line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant