Update FileCommandTestBase.cs to add additional heredoc edge cases

This commit is contained in:
Ben Wells
2023-07-21 15:55:35 -04:00
committed by GitHub
parent c71eceaae3
commit 2796fcdd87

View File

@@ -238,6 +238,10 @@ namespace GitHub.Runner.Common.Tests.Worker
"MY_KEY_4<<EOF",
"EOF EOF",
"EOF",
"MY_KEY_5=abc << def",
"MY_KEY_6= <<EOF",
"white space test",
"EOF"
};
TestUtil.WriteContent(stateFile, content);
_fileCmdExtension.ProcessCommand(_executionContext.Object, stateFile, null);
@@ -247,6 +251,8 @@ namespace GitHub.Runner.Common.Tests.Worker
Assert.Equal($"hello=two", _store["MY_KEY_2"]);
Assert.Equal($" EOF", _store["MY_KEY_3"]);
Assert.Equal($"EOF EOF", _store["MY_KEY_4"]);
Assert.Equal($"abc << def", _store["MY_KEY_5"]);
Assert.Equal($"white space test", _store["MY_KEY_6="]);
}
}