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

outline: Make reading source from stdin uniform across operating systems #760

Merged
merged 2 commits into from
Jan 11, 2021

Conversation

dlipovetsky
Copy link
Contributor

Let's say that there is an IDE plugin that calls gingko outline. It willlikely pipe the document contents via stdin. And the IDE will likely run onmultiple operating systems. With the - alias for stdin, the plugin can usethe same ginkgo command on every operating system. This alias is common, butnot ubiquituous. Users can continue to use operating system-specific filenamesfor stdin.

Example:

> cat outline/_testdata/normal_test.go | ./ginkgo outline -format=indent -
Name,Text,Start,End,Spec,Focused,Pending
Describe,NormalFixture,116,605,false,false,false
    Describe,normal,152,244,false,false,false
        It,normal,182,240,true,false,false
            By,step 1,207,219,false,false,false
            By,step 2,223,235,false,false,false
    Context,normal,247,307,false,false,false
        It,normal,276,303,true,false,false
    When,normal,310,367,false,false,false
        It,normal,336,363,true,false,false
    It,normal,370,396,true,false,false
    Specify,normal,399,430,true,false,false
    Measure,normal,433,480,true,false,false
    DescribeTable,normal,483,541,false,false,false
        Entry,normal,522,537,true,false,false
    DescribeTable,normal,544,602,false,false,false
        Entry,normal,583,598,true,false,false

Let's say that there is an IDE plugin that calls `gingko outline`. It will
likely pipe the document contents via stdin. And the IDE will likely run on
multiple operating systems. With the `-` alias for stdin, the plugin can use
the same ginkgo command on every operating system. This alias is common, but
not ubiquituous. Users can continue to use operating system-specific filenames
for stdin.

Example:

```shell
> cat outline/_testdata/normal_test.go | ./ginkgo outline -format=indent -
```

```shell
Name,Text,Start,End,Spec,Focused,Pending
Describe,NormalFixture,116,605,false,false,false
    Describe,normal,152,244,false,false,false
        It,normal,182,240,true,false,false
            By,step 1,207,219,false,false,false
            By,step 2,223,235,false,false,false
    Context,normal,247,307,false,false,false
        It,normal,276,303,true,false,false
    When,normal,310,367,false,false,false
        It,normal,336,363,true,false,false
    It,normal,370,396,true,false,false
    Specify,normal,399,430,true,false,false
    Measure,normal,433,480,true,false,false
    DescribeTable,normal,483,541,false,false,false
        Entry,normal,522,537,true,false,false
    DescribeTable,normal,544,602,false,false,false
        Entry,normal,583,598,true,false,false
```
@onsi onsi merged commit 935b538 into onsi:master Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants