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

--no-multiline does not hide multiline strings #201

Closed
thedjinn opened this issue Dec 10, 2011 · 7 comments
Closed

--no-multiline does not hide multiline strings #201

thedjinn opened this issue Dec 10, 2011 · 7 comments
Assignees
Milestone

Comments

@thedjinn
Copy link

Consider the following example:

Feature: Hiding multiline strings and tables

    Scenario: Hiding tables
        Given a table:
            | foo  | bar  |
            | quux | ding |

    Scenario: Hiding multiline strings
        Given a muiltiline string:
            """
            hello world
            this is a long string
            """

From the command line usage you can see that the expected functionality of the --no-multiline option is as follows:

Don't print multiline strings and tables under steps.

However, running Cucumber with this option produces this output:

Feature: Hiding multiline strings and tables

  Scenario: Hiding tables # features/bug.feature:2
    Given a table:        # features/bug.feature:3

  Scenario: Hiding multiline strings # features/bug.feature:7
    Given a muiltiline string:       # features/bug.feature:8
      """
      hello world
      this is a long string
      """

The table is clearly hidden, but the multiline string is still visible.

@mattwynne
Copy link
Member

I never cease to be amazed by the command-line switches people have added to Cucumber. Why would anyone want this option?

@thedjinn
Copy link
Author

I use Cucumber mostly to spec out the behavior for command line applications. In that case the scenarios usually have the following structure:

Scenario: Foo
  Given a file named "foo" with:
    """
    some big file here, e.g. XML data
    """
  When I run `mycmd foo`
  Then the output should contain exactly:
    """
    some big output here
    """

If you have a lot of these scenarios then Cucumber's output will get very cluttered. By hiding the multiline strings you can get a clear overview of the steps involved without showing too much detail.

@mattwynne
Copy link
Member

@tooky fancy taking a look at this one?

@ghost ghost assigned dkowis Mar 28, 2013
dkowis added a commit that referenced this issue Mar 28, 2013
@dkowis dkowis mentioned this issue Mar 28, 2013
@tooky
Copy link
Member

tooky commented Mar 28, 2013

Ahh too late, @mattwynne - thanks @dkowis!

@dkowis
Copy link
Member

dkowis commented Apr 3, 2013

@tooky I didn't pay attention before I noticed that @mattwynne poked you about it. I did it wrong the first time anyway :)

@os97673
Copy link
Member

os97673 commented Apr 4, 2013

fixed by #418

@os97673 os97673 closed this as completed Apr 4, 2013
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants