From 04a122aea561269c50871f6ff4851ab88c89b4e4 Mon Sep 17 00:00:00 2001 From: Jess Kube Date: Sun, 10 Dec 2023 21:36:48 -0800 Subject: [PATCH] unit test fix for sync -c --- source/P4VFS.UnitTest/Source/UnitTestWorkflow.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/P4VFS.UnitTest/Source/UnitTestWorkflow.cs b/source/P4VFS.UnitTest/Source/UnitTestWorkflow.cs index dcd6fd6..347ef00 100644 --- a/source/P4VFS.UnitTest/Source/UnitTestWorkflow.cs +++ b/source/P4VFS.UnitTest/Source/UnitTestWorkflow.cs @@ -86,18 +86,19 @@ public void SyncProtocolsTest() string clientRoot = GetClientRoot(); string directory = String.Format(@"{0}\depot\tools\dev\source", clientRoot); string revision = "@21"; + string[] syncArgs = WindowsInterop.CommandLineToArgs(syncOption); ServiceRestart(); Assert(ProcessInfo.ExecuteWait(P4vfsExe, String.Format("{0} sync {1} \"{2}\\...{3}\"", ClientConfig, syncOption, directory, revision), echo:true, log:true) == 0); Assert(ProcessInfo.ExecuteWait(P4Exe, String.Format("{0} flush -f \"{1}\\...{2}\"", ClientConfig, directory, revision), echo:true) == 0); Dictionary placeholderSizeMap = new Dictionary(); - if (WindowsInterop.CommandLineToArgs(syncOption).Contains("-c")) + if (syncArgs.Contains("-c")) { foreach (string filePath in Directory.GetFiles(clientRoot, "*", SearchOption.AllDirectories)) { placeholderSizeMap[filePath] = FileUtilities.GetFileLength(filePath); - Assert(IsPlaceholderFile(filePath)); + Assert(IsPlaceholderFile(filePath) || syncArgs.Contains("-r")); } }