コード例 #1
0
 public static void CopyDirectory(string src, string target)
 {
     Assert.AreEqual(0, ExecutionHelper.Execute("/bin/cp", new [] { "-r", src, target }));
 }
コード例 #2
0
        public void ProcessConfigWithoutValue()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--source=\"..\\..\\..\\Examples\\ConfigUsageExample\\ConfigUsageExample.sln\" --config=");

            ExecutionChecker.Check(executionResult, -1, "", SourceCheckUtilOutputDef.BadConfigMessage);
        }
コード例 #3
0
ファイル: MTouchTool.cs プロジェクト: ye-man/xamarin-macios
 public static IEnumerable <string> GetNativeSymbolsInExecutable(string executable, string arch = null)
 {
     IEnumerable <string> rv = ExecutionHelper.Execute("nm", $"{(arch == null ? string.Empty : $"-arch {arch} ")}-gUj {StringUtils.Quote (executable)}", hide_output: true).Split('\n');
コード例 #4
0
        public void ProcessUnknownConfig(OutputLevel outputLevel)
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\GoodExample\\GoodExample.csproj", "..\\SomeConfig.config", outputLevel);

            ExecutionChecker.Check(executionResult, -1, "", SourceCheckUtilOutputDef.BadConfigMessage);
        }
コード例 #5
0
        public void ProcessConfigWithoutSource()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--config=\"..\\..\\..\\Examples\\ConfigUsageExample\\Config\"");

            ExecutionChecker.Check(executionResult, -1, SourceCheckUtilOutputDef.AppDescription, SourceCheckUtilOutputDef.BadUsageMessage);
        }
コード例 #6
0
        public void ProcessSourceWithoutValue()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--source= --output-level=Error");

            ExecutionChecker.Check(executionResult, -1, "", SourceCheckUtilOutputDef.BadSourceMessage);
        }
コード例 #7
0
        public void ProcessUnknownSource(OutputLevel outputLevel)
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("SomeUnknownExample.csproj", null, outputLevel);

            ExecutionChecker.Check(executionResult, -1, "", "[ERROR]: Bad (unknown) target SomeUnknownExample.csproj\r\n");
        }
コード例 #8
0
        public void ProcessVersion()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--version");

            ExecutionChecker.Check(executionResult, 0, "0.9\r\n", "");
        }
コード例 #9
0
        public void ProcessUnknownArg(String args)
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--some-strange-option");

            ExecutionChecker.Check(executionResult, -1, SourceCheckUtilOutputDef.AppDescription, SourceCheckUtilOutputDef.BadUsageMessage);
        }
コード例 #10
0
        public void ProcessProjectWithDependencies(OutputLevel outputLevel)
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\LibraryDependenciesExample\\DependentLibrary\\DependentLibrary.csproj", null, outputLevel);

            ExecutionChecker.Check(executionResult, 0, "", "");
        }
コード例 #11
0
        public void ProcessSolutionWithDependenciesBetweenProjects(OutputLevel outputLevel)
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\LibraryDependenciesExample\\LibraryDependenciesExample.sln", null, outputLevel);

            ExecutionChecker.Check(executionResult, 0, "", "");
        }
コード例 #12
0
        public void ProcessHelp()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--help");

            ExecutionChecker.Check(executionResult, 0, SourceCheckUtilOutputDef.AppDescription, "");
        }
コード例 #13
0
        public void ProcessGoodExampleProjectError()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\GoodExample\\GoodExample.csproj", null, OutputLevel.Error);

            ExecutionChecker.Check(executionResult, 0, "", "");
        }
コード例 #14
0
        public void ProcessOutputLevelWithoutValue()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--source=\"..\\..\\..\\Examples\\ConfigUsageExample\\ConfigUsageExample.sln\" --output-value=");

            ExecutionChecker.Check(executionResult, -1, SourceCheckUtilOutputDef.AppDescription, SourceCheckUtilOutputDef.BadUsageMessage);
        }