public void DeleteLogo()
        {
            EngineState s                = EngineTests.CreateEngineState();
            string      scriptDir        = Path.Combine(StringEscaper.Preprocess(s, "%TestBench%"), "EncodedFile");
            string      logoScriptPath   = Path.Combine(scriptDir, "Blank.script");
            string      noLogoScriptPath = Path.Combine(scriptDir, "CompleteBlank.script");

            // ReSharper disable once ParameterOnlyUsedForPreconditionCheck.Local
            void Template(string testScriptPath, bool result)
            {
                string destDir    = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
                string destScript = Path.Combine(destDir, "DeleteLogoTest.script");

                Directory.CreateDirectory(destDir);
                try
                {
                    File.Copy(testScriptPath, destScript, true);

                    string errMsg;
                    Script sc = s.Project.LoadScriptRuntime(destScript, new LoadScriptRuntimeOptions());
                    (sc, errMsg) = EncodedFile.DeleteLogo(sc);

                    if (errMsg != null)
                    {
                        Assert.IsFalse(result);
                        return;
                    }
                    Assert.IsTrue(result);

                    Assert.IsFalse(EncodedFile.ContainsLogo(sc));
                }
                finally
                {
                    if (Directory.Exists(destDir))
                    {
                        Directory.Delete(destDir, true);
                    }
                }
            }

            Template(logoScriptPath, true);
            Template(noLogoScriptPath, false);
        }