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

The -o option can be used multiple times No.2 #329

Merged
merged 3 commits into from
Jan 2, 2021

Conversation

milo
Copy link
Member

@milo milo commented Jul 7, 2016

Alternative approach to #310.

@dg
Copy link
Member

dg commented Jul 7, 2016

stdout -> stdoutFormat 👍

options['-o'] -> $this->outputs hmmm, perhaps unnecessary internal dependency…

I compared it on GitHub in phone and it is quite possible that I missed the other differences.

-o <console|tap|junit|log|none>
Specify one or more output formats with optional file name.
(e.g. -o junit:output.xml)
-w | --watch <path> Watch directory.
Copy link
Member

Choose a reason for hiding this comment

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

What about -o <console|tap|junit|log|none> (e.g. -o junit:output.xml) to save one row?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try that.

Copy link
Member Author

Choose a reason for hiding this comment

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

IMHO, it looks strange when not aligned.

@milo
Copy link
Member Author

milo commented Jul 7, 2016

options['-o'] -> $this->outputs hmmm, perhaps unnecessary internal dependency…

Yes. That's part I don't like too but I cannot figure how to solve it in other way. Imagine I will call -o console -o tap:output.tap -o junit:output.xml, I would like to:

  • keep ENUM check in CommandLine. So value tap:file.name has to be modified before this check (NORMALIZER do it) and file.name has to be kept somewhere for OutputHandler's constructor. The $this->outputs is used for this. I cannot figure how to keep file.name as a part of $options['-o'] without hidden functionality.
  • prevent more outputs into one file

@milo
Copy link
Member Author

milo commented Jul 8, 2016

@dg Updated

@TomasVotruba
Copy link

What needs to be done here?

@milo
Copy link
Member Author

milo commented Oct 21, 2016

Not sure. But I'm not satisfied with an implementation.

@TomasVotruba
Copy link

What could be changed to make you more satisfied?

@milo
Copy link
Member Author

milo commented Oct 21, 2016

That's what I'm nor sure about. The part with NORMALIZER probably. The main purpose for this PR is to allow pass multiple output handlers by CLI arguments. Propose is -o format:file.ext. Maybe another syntax would be better and more straightfoward for implementation.

milo added a commit to milo/tester that referenced this pull request Jan 2, 2021
milo added a commit to milo/tester that referenced this pull request Jan 2, 2021
@milo milo merged commit 12585ef into nette:master Jan 2, 2021
milo added a commit that referenced this pull request Jan 3, 2021
dg pushed a commit that referenced this pull request Jan 31, 2021
dg pushed a commit that referenced this pull request Jan 31, 2021
dg pushed a commit that referenced this pull request Feb 5, 2021
dg pushed a commit that referenced this pull request Feb 5, 2021
dg pushed a commit that referenced this pull request Mar 1, 2021
dg pushed a commit that referenced this pull request Mar 1, 2021
dg pushed a commit that referenced this pull request Mar 1, 2021
dg pushed a commit that referenced this pull request Mar 1, 2021
dg pushed a commit that referenced this pull request Mar 1, 2021
dg pushed a commit that referenced this pull request Mar 1, 2021
@milo milo deleted the pull-multi-output-v2 branch July 21, 2022 13:00
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

4 participants