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

In nunit3-console you cannot pass parameters containing ';' because they always get splitted #1694

Closed
SilverXXX opened this issue Jul 22, 2016 · 5 comments

Comments

@SilverXXX
Copy link

SilverXXX commented Jul 22, 2016

When running some tests with nunit3-console.exe, if you pass with --param there is no way to pass inside a value a ';'.

It seems from CommandLineOptions.cs the you can't escape them in any way (it's not documented so i read the source directly).
A regex to capture only not escaped char would solve the problem (i'm not a regex expert so i cant suggest exact one)

@rprouse
Copy link
Member

rprouse commented Jul 22, 2016

See our docs, there is general information there on quoting for various operating systems. You can also have multiple --param in the command line, one per variable.

I am closing this as a question, but feel free to add questions, we will see them and try to help.

@ChrisMaddock
Copy link
Member

ChrisMaddock commented Jul 22, 2016

@rprouse - I think this is a potential 'issue' within NUnit, not command line usage? Looks like the options will always split on semi-colon, and then throw if it's not a valid A=B format afterwards? So I don't think there is any way pass in a test parameter with a semi-colon currently. (If that's to be a supported thing to do!)

@SilverXXX
Copy link
Author

SilverXXX commented Jul 22, 2016

Yes @ChrisMaddock, i would have tried to create a pull request to show a possible solution, it actually require only a one line change and a sensible regexp, but i'm quite bad at it (a connection string is a simple example of an impossible paramater to pass right now)
Edit: and since it's all made of key=value it doesnt even return an error

@rprouse
Copy link
Member

rprouse commented Jul 22, 2016

Sorry, reading issues on my phone, I missed the detail 😦

@CharliePoole
Copy link
Contributor

Issue moved to nunit/nunit-console #23 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants