Skip to content

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

Merged
milo merged 3 commits into
nette:masterfrom
milo:pull-multi-output-v2
Jan 2, 2021
Merged

The -o option can be used multiple times No.2#329
milo merged 3 commits into
nette:masterfrom
milo:pull-multi-output-v2

Conversation

@milo

@milo milo commented Jul 7, 2016

Copy link
Copy Markdown
Member

Alternative approach to #310.

@dg

dg commented Jul 7, 2016

Copy link
Copy Markdown
Member

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.

Comment thread src/Runner/CliTester.php Outdated
-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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

milo commented Jul 7, 2016

Copy link
Copy Markdown
Member Author

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

milo commented Jul 8, 2016

Copy link
Copy Markdown
Member Author

@dg Updated

@TomasVotruba

Copy link
Copy Markdown

What needs to be done here?

@milo

milo commented Oct 21, 2016

Copy link
Copy Markdown
Member Author

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

@TomasVotruba

Copy link
Copy Markdown

What could be changed to make you more satisfied?

@milo

milo commented Oct 21, 2016

Copy link
Copy Markdown
Member Author

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.

@dg dg force-pushed the master branch 2 times, most recently from 715ed4e to 334dc33 Compare January 4, 2017 14:23
@dg dg force-pushed the master branch 3 times, most recently from c7e8a12 to df5e87f Compare July 24, 2017 14:21
@dg dg force-pushed the master branch 2 times, most recently from b9711f5 to 3f273cf Compare June 7, 2018 11:24
@milo milo mentioned this pull request Sep 5, 2018
@milo milo force-pushed the master branch 2 times, most recently from eaaeb7b to 7184606 Compare February 21, 2019 06:47
@dg dg force-pushed the master branch 2 times, most recently from ee525b7 to 6ca248e Compare February 27, 2019 13:34
@dg dg force-pushed the master branch 4 times, most recently from 176965b to 0e20479 Compare November 19, 2019 01:10
@dg dg force-pushed the master branch 4 times, most recently from 977e96a to dd5bc63 Compare October 15, 2020 20:09
@dg dg force-pushed the master branch 6 times, most recently from 4969211 to 81b3703 Compare November 2, 2020 17:30
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 force-pushed the pull-multi-output-v2 branch from a5ae677 to abc18e7 Compare January 2, 2021 21:25
milo added a commit to milo/tester that referenced this pull request Jan 2, 2021
@milo milo force-pushed the pull-multi-output-v2 branch from abc18e7 to f7ae74a Compare January 2, 2021 21:31
@milo milo force-pushed the pull-multi-output-v2 branch from f7ae74a to 12585ef Compare January 2, 2021 21:36
@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
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.

4 participants