From e52dc01e7a6e7f4e2ea778bd0071633c3f3816d8 Mon Sep 17 00:00:00 2001 From: Nathan McRae Date: Wed, 14 Feb 2024 18:32:31 -0800 Subject: [PATCH] Add comment parsing test --- SaneTsv/SaneTsvTest/Program.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/SaneTsv/SaneTsvTest/Program.cs b/SaneTsv/SaneTsvTest/Program.cs index c9b8b25..7878575 100644 --- a/SaneTsv/SaneTsvTest/Program.cs +++ b/SaneTsv/SaneTsvTest/Program.cs @@ -34,5 +34,19 @@ using System.Text; Console.WriteLine($"Passed {testName}"); } - Console.WriteLine("Done with tests"); } + +{ + string testName = "Comment test"; + string testString1 = "#This is a file comment\n" + + " #One more file comment line\n" + + "column1:type:boolean\tcolumn2:binary\tcolumnthree\\nyep:string" + + "\n#This is a comment" + + "\n#Another comment line" + + "\nTRUE\tvalue\\\\t\0woo\tvaluetrhee" + + "\nFALSE\tnother\tno\\ther"; + + SaneTsv parsed = SaneTsv.ParseCommentedTsv(Encoding.UTF8.GetBytes(testString1)); +} + +Console.WriteLine("Done with tests");