From 3232fdd1fffa919f98eca33f90f8a3b69c6f7ed2 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 23 Sep 2018 05:58:13 +0200 Subject: [PATCH] Version 4.4.3: fix 4.4.2 --- VERSION | 2 +- changelog.md | 4 ++++ src/be/nikiroo/utils/test/TestCase.java | 16 +++++++++------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 1d068c6e..9e3a9335 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.2 +4.4.3 diff --git a/changelog.md b/changelog.md index f0947f79..1f0b60cc 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # nikiroo-utils +## Version 4.4.3 + +- Test assertions: fix files/dir content comparison code + ## Version 4.4.2 - Test assertions: can now compare files/dir content diff --git a/src/be/nikiroo/utils/test/TestCase.java b/src/be/nikiroo/utils/test/TestCase.java index 9b8086f7..2e46a7b5 100644 --- a/src/be/nikiroo/utils/test/TestCase.java +++ b/src/be/nikiroo/utils/test/TestCase.java @@ -439,13 +439,15 @@ abstract public class TestCase { String resultLine = resultLines.get(j); boolean skip = false; - for (Entry> skipThose : skipCompare - .entrySet()) { - for (String skipStart : skipThose.getValue()) { - if (name.endsWith(skipThose.getKey()) - && expectedLine.startsWith(skipStart) - && resultLine.startsWith(skipStart)) { - skip = true; + if (skipCompare != null) { + for (Entry> skipThose : skipCompare + .entrySet()) { + for (String skipStart : skipThose.getValue()) { + if (name.endsWith(skipThose.getKey()) + && expectedLine.startsWith(skipStart) + && resultLine.startsWith(skipStart)) { + skip = true; + } } } } -- 2.27.0