public async Task LocalBashRunBasicCommand() { string bashCmds = "ls\n"; List <string> results = new List <string>(); LocalBashExecutor.AddLogEndpoint(s => results.Add(s)); await LocalBashHelpers.RunBashCommandAsync("testmeout", bashCmds, s => Console.WriteLine(s), verbose : true); Assert.AreNotEqual(0, results.Count); }
public async Task LocalBashRunSimpleROOT() { var cmds = new StringBuilder(); cmds.AppendLine("TH1F *h = new TH1F(\"hi\", \"there\", 10, 0.0, 10.0);"); cmds.AppendLine("h->Print();"); List <string> results = new List <string>(); LocalBashExecutor.AddLogEndpoint(s => results.Add(s)); await LocalBashHelpers.RunROOTInBashAsync("test", cmds.ToString(), new System.IO.DirectoryInfo(System.IO.Path.GetTempPath())); Assert.AreNotEqual(0, results.Count); }