1
0
Fork 0
mirror of https://github.com/imjasonh/testscript-rs synced 2026-07-08 09:05:34 +00:00
testscript-rs/testdata/env_conditions.txt
copilot-swe-agent[bot] 26a39e2384 Implement network and advanced condition support
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
2025-09-27 01:56:58 +00:00

19 lines
No EOL
751 B
Text

# Test environment variable conditions
# Set an env var in the test
env TEST_VAR=hello
# This should execute since TEST_VAR is now set
[env:TEST_VAR] exec echo "Environment variable TEST_VAR is set"
[env:TEST_VAR] stdout "Environment variable TEST_VAR is set"
# This should be skipped since MISSING_VAR is not set
[env:MISSING_VAR] exec echo "This should not appear"
# This should execute since MISSING_VAR is not set (negated condition)
[!env:MISSING_VAR] exec echo "MISSING_VAR is not set (as expected)"
[!env:MISSING_VAR] stdout "MISSING_VAR is not set (as expected)"
# Test PATH environment variable which should exist on all systems
[env:PATH] exec echo "PATH environment variable exists"
[env:PATH] stdout "PATH environment variable exists"