// ---------------------------------------------------------------------------------------- /// <!-- TestKeyListFile --> /// <summary> /// /// </summary> /// <param name="inputPath"></param> /// <param name="targetPath"></param> /// <remarks> /// Usage: /// KeyListFile.TestKeyListFile("C:\\docs\\input.txt", "C:\\docs\\output.txt"); /// </remarks> public static void TestKeyListFile(string inputPath, string targetPath) { // -------------------------------------------------------------------------- // Produce a report of what keys contain what values in their value list // -------------------------------------------------------------------------- string fileInput = KeyListFile.GetStringFromFile(inputPath, ""); KeyListFile valuesforEachKey = new KeyListFile(fileInput, ':', ' '); KeyListFile keysForEachValue = valuesforEachKey.ConvertValuesAndKeys(':', ' '); string report = keysForEachValue.ConstructOrderedReport(false, true); // -------------------------------------------------------------------------- // Test and output the report // -------------------------------------------------------------------------- string target = KeyListFile.GetStringFromFile(targetPath, ""); if (report == target) { Console.Write("success\r\n"); } else { Console.Write("not quite\r\n"); } Console.Write(report); }