Test: Fix flaky DocumentTests by using arrays
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Test / Run tests (push) Successful in 1m46s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Test / Run tests (push) Successful in 1m46s
				
			This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
			
		||||
using Elwig.Documents;
 | 
			
		||||
using NReco.PdfRenderer;
 | 
			
		||||
using System.Text.RegularExpressions;
 | 
			
		||||
 | 
			
		||||
namespace Tests.DocumentTests {
 | 
			
		||||
    public static class Utils {
 | 
			
		||||
@@ -16,5 +17,13 @@ namespace Tests.DocumentTests {
 | 
			
		||||
                File.Delete(FileName);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static string[][] ExtractTable(string text) {
 | 
			
		||||
            return text.Split('\n')
 | 
			
		||||
                .Select(row => Regex.Split(row, @"\s{2,}").Select(c => c.Trim()).ToArray())
 | 
			
		||||
                .Where(row => row.Length > 3)
 | 
			
		||||
                .Skip(1)
 | 
			
		||||
                .ToArray();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user