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

            ExecutionChecker.Check(executionResult, -1, "", SourceCheckUtilOutputDef.BadConfigMessage);
        }
Esempio n. 3
0
 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');
        public void ProcessUnknownConfig(OutputLevel outputLevel)
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\GoodExample\\GoodExample.csproj", "..\\SomeConfig.config", outputLevel);

            ExecutionChecker.Check(executionResult, -1, "", SourceCheckUtilOutputDef.BadConfigMessage);
        }
        public void ProcessConfigWithoutSource()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--config=\"..\\..\\..\\Examples\\ConfigUsageExample\\Config\"");

            ExecutionChecker.Check(executionResult, -1, SourceCheckUtilOutputDef.AppDescription, SourceCheckUtilOutputDef.BadUsageMessage);
        }
        public void ProcessSourceWithoutValue()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--source= --output-level=Error");

            ExecutionChecker.Check(executionResult, -1, "", SourceCheckUtilOutputDef.BadSourceMessage);
        }
        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");
        }
        public void ProcessVersion()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--version");

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

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

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

            ExecutionChecker.Check(executionResult, 0, "", "");
        }
        public void ProcessHelp()
        {
            ExecutionResult executionResult = ExecutionHelper.Execute("--help");

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

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

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