From 32fe75446e98c0580d50448c4b968ea3dde133cf Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Tue, 23 Sep 2025 23:11:15 +1200 Subject: [PATCH] integration tests: Allow literal '$' in expected contents Escape a literal $ with $$. --- internal/tshelpers/custom_commands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/tshelpers/custom_commands.go b/internal/tshelpers/custom_commands.go index be0bd7f40c..f2e1b3d4ea 100644 --- a/internal/tshelpers/custom_commands.go +++ b/internal/tshelpers/custom_commands.go @@ -397,6 +397,9 @@ func archiveFileNames(isoPath string) (string, string, error) { func expand(ts *testscript.TestScript, s []byte) string { return os.Expand(string(s), func(key string) string { + if key == "$" { + return "$" + } return ts.Getenv(key) }) }