From 737d326e7a9bc4d6594f19378dc168b3afe7d072 Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Tue, 10 Jan 2017 11:35:19 +0100 Subject: [PATCH] Improved test code --- test/commonTestUtils.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/commonTestUtils.nim b/test/commonTestUtils.nim index e4cf2a5..bbba7c8 100644 --- a/test/commonTestUtils.nim +++ b/test/commonTestUtils.nim @@ -4,7 +4,7 @@ # See the file "copying.txt", included in this # distribution, for details about the copyright. -import "../yaml" +import "../yaml", strutils proc escapeNewlines(s: string): string = result = "" @@ -22,7 +22,7 @@ proc printDifference*(expected, actual: YamlStreamEvent) = case expected.kind of yamlScalar: if expected.scalarTag != actual.scalarTag: - echo "[\"", actual.scalarContent, "\".tag] expected tag ", + echo "[", escape(actual.scalarContent), ".tag] expected tag ", expected.scalarTag, ", got ", actual.scalarTag elif expected.scalarAnchor != actual.scalarAnchor: echo "[scalarEvent] expected anchor ", expected.scalarAnchor,