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

Prevent crash on invalid --result parsing in NUnitLite #2312

Merged
merged 3 commits into from Jul 11, 2017
Merged

Conversation

ChrisMaddock
Copy link
Member

This prevents a crash in the NUnitLite runner when an invalid --result command is specified. It essentially ports nunit/nunit-console#257 to the NUnitLite runner.

The major difference is that NUnitLite would previously read the transform specifier, but made no use of it. In line with our vision of not having NUnitLite and the Console have exact matching functionality, I stripped the parsing logic for this out, so it a user specifies a transform, it will be seen as invalid.

mikkelbu
mikkelbu previously approved these changes Jul 10, 2017
Copy link
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found - more or less - nothing wrong with this PR. So feel free to follow the comments, but I don't think it should hold back the merge.

Assert.That(options.ErrorMessages, Has.Exactly(1).Contains("invalid output spec").IgnoreCase);
}

#endregion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coding standards is currently empty regarding regions (see e.g. https://github.com/nunit/docs/wiki/Coding-Standards#use-of-regions) - and personally I don't like them :) - but I think that region pairs should be indented to the same level.


#region Explore Option
#region Explore Option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coding standards is currently empty regarding regions (see e.g. https://github.com/nunit/docs/wiki/Coding-Standards#use-of-regions) - and personally I don't like them :) - but I think that region pairs should be indented to the same level.

@ChrisMaddock
Copy link
Member Author

Thanks @mikkelbu 🙂

I fixed the #region alignment to be consistent in the file at least. Will merge once CI has passed again.

@rprouse
Copy link
Member

rprouse commented Jul 11, 2017

I prefer indented regions too, but unfortunately adding various #if blocks causes #region to become unindented in VS 2015 and 2017, so I have nearly given up trying to fix that. If anyone can show me the setting that stops that I will be eternally grateful 😄

Looks good...

@rprouse
Copy link
Member

rprouse commented Jul 11, 2017

Failed AppVeyor build is the unrelated .NET 3.5 failure that we already have an issue for, so I am merging. Very odd that it is only 3.5 failing since we have so few #if blocks for 3.5 (if any?).

@rprouse rprouse merged commit 99068ab into master Jul 11, 2017
@rprouse rprouse deleted the resultformat branch July 11, 2017 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants