Ejemplo n.º 1
0
        public void EnryPointUtilities_GenerateArguments_StripsQuotesFromAroundArgsWithSpacesInResponseFiles()
        {
            const string ResponseFileName     = "test.rsp";
            var          responseFileContents = new[] { "a \"one two\" b" };
            var          mockFileSystem       = MockFactory.MakeMockFileSystem(ResponseFileName, responseFileContents);

            var args = new[] { "@" + ResponseFileName };

            string[] result = EntryPointUtilities.GenerateArguments(args, mockFileSystem, MockFactory.MakeMockEnvironmentVariables());

            result.Length.Should().Be(3);
            result.Should().ContainInOrder("a", "one two", "b");
        }
Ejemplo n.º 2
0
        public void EnryPointUtilities_GenerateArguments_ExpandsResponseFileContents()
        {
            const string ResponseFileName     = "test.rsp";
            var          responseFileContents = new[] { "/b", "/c:val /d", "   /e   " };
            var          mockFileSystem       = MockFactory.MakeMockFileSystem(ResponseFileName, responseFileContents);

            var args = new[] { "/a", "@" + ResponseFileName, "/f" };

            string[] result = EntryPointUtilities.GenerateArguments(args, mockFileSystem, MockFactory.MakeMockEnvironmentVariables());

            result.Length.Should().Be(6);
            result.Should().ContainInOrder("/a", "/b", "/c:val", "/d", "/e", "/f");
        }