updating test cases and fixing normal style check

This commit is contained in:
Ben Wells
2023-07-26 15:53:57 +00:00
parent 45d079e5f3
commit 9c8abf2a6e
2 changed files with 5 additions and 4 deletions

View File

@@ -364,8 +364,8 @@ namespace GitHub.Runner.Worker
output = endIndex > startIndex ? text.Substring(startIndex, endIndex - startIndex) : string.Empty;
}
// Normal style NAME=VALUE
else if (equalsIndex >= 0 && heredocIndex < 0)
// Normal style NAME=VALUE, can have << in the value.
else if (equalsIndex >= 0)
{
var split = line.Split(new[] { '=' }, 2, StringSplitOptions.None);
if (string.IsNullOrEmpty(line))

View File

@@ -242,9 +242,10 @@ namespace GitHub.Runner.Common.Tests.Worker
"MY_KEY_6= <<EOF",
"white space test",
"EOF",
"MY_KEY_7 << =EOF=",
"MY_KEY_7 <<=EOF=",
"abc",
"=EOF="
"=EOF=",
string.Empty
};
TestUtil.WriteContent(stateFile, content);
_fileCmdExtension.ProcessCommand(_executionContext.Object, stateFile, null);