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: Expose Environ() to custom commands #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented May 11, 2024

This adds an Environ method to TestScript
that looks and acts similarly to os.Environ.

This gives further visibility into the test script state
to custom command implementations,
allowing them to implement functionality that is otherwise limited
only to the built-in commands.

For example, combining this and MkAbs, a custom command can use os/exec
to run a command with the same environment as the test script,
with different behavior than the built-in TestScript.Exec method.

This adds an Environ method to TestScript
that looks and acts similarly to os.Environ.

This gives further visibility into the test script state
to custom command implementations,
allowing them to implement functionality that is otherwise limited
only to the built-in commands.

For example, combining this and MkAbs, a custom command can use os/exec
to run a command with the same environment as the test script,
with different behavior than the built-in TestScript.Exec method.
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

1 participant