diff --git a/tests/Tgstation.Server.Host.Tests/IO/TestPostWriteHandler.cs b/tests/Tgstation.Server.Host.Tests/IO/TestPostWriteHandler.cs index 7a309c4455..e5081ea7f4 100644 --- a/tests/Tgstation.Server.Host.Tests/IO/TestPostWriteHandler.cs +++ b/tests/Tgstation.Server.Host.Tests/IO/TestPostWriteHandler.cs @@ -40,24 +40,22 @@ namespace Tgstation.Server.Host.IO.Tests var tmpFile = Path.GetTempFileName(); try { + Assert.IsFalse(postWriteHandler.NeedsPostWrite(tmpFile)); postWriteHandler.HandleWrite(tmpFile); if (isWindows) return; //you do nothing //ensure it is now executable + Assert.IsTrue(postWriteHandler.NeedsPostWrite(tmpFile)); File.WriteAllBytes(tmpFile, Encoding.UTF8.GetBytes("#!/bin/sh\n")); - Assert.IsFalse(postWriteHandler.NeedsPostWrite(tmpFile)); - using (var process = Process.Start(tmpFile)) { process.WaitForExit(); Assert.AreEqual(0, process.ExitCode); } - Assert.IsTrue(postWriteHandler.NeedsPostWrite(tmpFile)); - //run it again for the code coverage on that part where no changes are made if it's already executable postWriteHandler.HandleWrite(tmpFile); }