Exemplo n.º 1
0
        public void Running_Build_Output_Standalone_EXE_with_DepsJson_and_RuntimeConfig_Local_Succeeds()
        {
            var fixture = PreviouslyBuiltAndRestoredStandaloneTestProjectFixture
                          .Copy();

            var appExe = fixture.TestProject.AppExe;

            Command.Create(appExe)
            .CaptureStdErr()
            .CaptureStdOut()
            .Execute()
            .Should()
            .Pass()
            .And
            .HaveStdOutContaining("Hello World");
        }
        public void Running_Build_Output_Standalone_EXE_with_DepsJson_and_RuntimeConfig_Local_Succeeds()
        {
            var fixture = PreviouslyBuiltAndRestoredStandaloneTestProjectFixture
                          .Copy();

            var appExe = fixture.TestProject.AppExe;

            // TODO: Use FS.Chmod when build utility project is converted to csproj.
            // See https://github.com/NuGet/Home/issues/4424
            if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                Command.Create("chmod", "u+x", appExe).Execute().EnsureSuccessful();
            }

            Command.Create(appExe)
            .CaptureStdErr()
            .CaptureStdOut()
            .Execute()
            .Should()
            .Pass()
            .And
            .HaveStdOutContaining("Hello World");
        }