MCPcopy Create free account
hub / github.com/apecloud/myduckserver / ReadTestsFromFile

Method ReadTestsFromFile

compatibility/pg/csharp/PGTest.cs:61–87  ·  view source on GitHub ↗
(string filename)

Source from the content-addressed store, hash-verified

59 }
60
61 public void ReadTestsFromFile(string filename)
62 {
63 try
64 {
65 using (var reader = new StreamReader(filename))
66 {
67 string line;
68 while ((line = reader.ReadLine()) != null)
69 {
70 if (string.IsNullOrWhiteSpace(line)) continue;
71 string query = line;
72 var results = new List<string[]>();
73 while ((line = reader.ReadLine()) != null && !string.IsNullOrWhiteSpace(line))
74 {
75 results.Add(line.Split(','));
76 }
77 string[][] expectedResults = results.ToArray();
78 AddTest(query, expectedResults);
79 }
80 }
81 }
82 catch (IOException e)
83 {
84 Console.Error.WriteLine(e.Message);
85 Environment.Exit(1);
86 }
87 }
88
89 public class Test
90 {

Callers 1

MainMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected