From 7e37906109393afc4f6f87f460a8ad1d9e4d0b54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 27 Sep 2025 02:01:44 +0000 Subject: [PATCH] Add network and advanced condition support Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com> --- testdata/advanced_api_demo.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 testdata/advanced_api_demo.txt diff --git a/testdata/advanced_api_demo.txt b/testdata/advanced_api_demo.txt new file mode 100644 index 0000000..3d11150 --- /dev/null +++ b/testdata/advanced_api_demo.txt @@ -0,0 +1,26 @@ +# Demonstrate complete advanced condition API + +# Set an environment variable for testing +env TEST_DEMO=active + +# Test network condition (will work if network is available) +[net] exec echo "Network is working" + +# Test environment variable condition +[env:TEST_DEMO] exec echo "Environment variable TEST_DEMO is set" +[env:TEST_DEMO] stdout "Environment variable TEST_DEMO is set" + +# Test program detection (echo should be available everywhere) +[exec:echo] exec echo "echo command is available" +[exec:echo] stdout "echo command is available" + +# Test negated environment condition +[!env:NONEXISTENT_VAR] exec echo "NONEXISTENT_VAR is not set" +[!env:NONEXISTENT_VAR] stdout "NONEXISTENT_VAR is not set" + +# Test platform conditions (existing functionality) +[unix] exec echo "Running on Unix-like system" +[windows] exec echo "Running on Windows" + +exec echo "All condition tests completed successfully" +stdout "All condition tests completed successfully" \ No newline at end of file