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

testscript: add 'unix' condition? #166

Closed
bitfield opened this issue Jul 23, 2022 · 2 comments · Fixed by #169
Closed

testscript: add 'unix' condition? #166

bitfield opened this issue Jul 23, 2022 · 2 comments · Fixed by #169

Comments

@bitfield
Copy link
Contributor

Now that Go considers the unix pseudo-tag to be satisfied by any sufficiently Unixy system, following a successful campaign by myself (and, to a lesser extent, Rob Pike)—should testscript's imported copy of build.go be updated to support this as a condition in scripts?

Then I could write:

[unix] exec echo 'It''s a UNIX system! I know this!'
@mvdan
Copy link
Collaborator

mvdan commented Jul 23, 2022

For sure - want to send a PR?

bitfield added a commit to bitfield/go-internal that referenced this issue Jul 24, 2022
From Go 1.19, the build constraint 'unix' proposed in golang/go#20322 is
satisfied by any sufficiently Unix-like value of GOOS, as defined by
src/go/build/syslist.go. This commit adds a predefined 'unix' condition
with the same meaning, available for use in test scripts. The condition
is satisfied if the target GOOS is one of the list of Unix-like systems
defined in 'imports.UnixOS'.

Fixes rogpeppe#166.
@bitfield
Copy link
Contributor Author

With pleasure, thank you @mvdan.

bitfield added a commit to bitfield/go-internal that referenced this issue Jul 28, 2022
From Go 1.19, the build constraint 'unix' proposed in golang/go#20322 is
satisfied by any sufficiently Unix-like value of GOOS, as defined by
src/go/build/syslist.go. This commit adds a predefined 'unix' condition
with the same meaning, available for use in test scripts. The condition
is satisfied if the target GOOS is one of the list of Unix-like systems
defined in 'imports.UnixOS'.

Fixes rogpeppe#166.

Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
bitfield added a commit to bitfield/go-internal that referenced this issue Jul 28, 2022
From Go 1.19, the build constraint 'unix' proposed in golang/go#20322 is
satisfied by any sufficiently Unix-like value of GOOS, as defined by
src/go/build/syslist.go. This commit adds a predefined 'unix' condition
with the same meaning, available for use in test scripts. The condition
is satisfied if the target GOOS is one of the list of Unix-like systems
defined in 'imports.UnixOS'.

Fixes rogpeppe#166.

Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
mvdan added a commit that referenced this issue Jul 28, 2022
From Go 1.19, the build constraint 'unix' proposed in golang/go#20322 is
satisfied by any sufficiently Unix-like value of GOOS, as defined by
src/go/build/syslist.go. This commit adds a predefined 'unix' condition
with the same meaning, available for use in test scripts. The condition
is satisfied if the target GOOS is one of the list of Unix-like systems
defined in 'imports.UnixOS'.

Fixes #166.

Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
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 a pull request may close this issue.

2 participants