Skip to content

Commit 29baeae

Browse files
committed
Test using %FOO% instead of %PATH%
1 parent a4ff99f commit 29baeae

File tree

1 file changed

+5
-5
lines changed
  • test/standalone/windows_bat_args

1 file changed

+5
-5
lines changed

test/standalone/windows_bat_args/test.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ pub fn main() anyerror!void {
7777
var path_env = std.process.EnvMap.init(allocator);
7878
errdefer path_env.deinit();
7979
// No escaping
80-
try path_env.put("PATH", "123");
81-
// Some possible escaping of %PATH% that could be expanded
80+
try path_env.put("FOO", "123");
81+
// Some possible escaping of %FOO% that could be expanded
8282
// when escaping cmd.exe meta characters with ^
83-
try path_env.put("PATH^", "123"); // only escaping %
84-
try path_env.put("^P^A^T^H^", "123"); // escaping every char
83+
try path_env.put("FOO^", "123"); // only escaping %
84+
try path_env.put("^F^O^O^", "123"); // escaping every char
8585
break :path_env path_env;
8686
};
8787
defer path_env.deinit();
88-
try testExec(allocator, &.{"%PATH%"}, &path_env);
88+
try testExec(allocator, &.{"%FOO%"}, &path_env);
8989

9090
// Ensure that none of the `>file.txt`s have caused file.txt to be created
9191
try std.testing.expectError(error.FileNotFound, tmp.dir.access("file.txt", .{}));

0 commit comments

Comments
 (0)