File: 0002-Fix-a-test.patch

package info (click to toggle)
libwoodstox-java 1%3A6.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 4,428 kB
  • sloc: java: 59,965; xml: 437; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 1,174 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Giovanni Mascellani <gio@debian.org>
Date: Sat, 10 Sep 2016 18:37:27 +0200
Subject: Fix a test.

A woodstox test depends on an error string being returned in English,
so is broken when a different locale is set.

This patch tests the exception class name instead of its message,
which does not depend on the locale.
---
 src/test/java/wstxtest/sax/TestEntityResolver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: libwoodstox-java.6/src/test/java/wstxtest/sax/TestEntityResolver.java
===================================================================
--- libwoodstox-java.6.orig/src/test/java/wstxtest/sax/TestEntityResolver.java	2020-05-04 17:08:08.522865155 +0200
+++ libwoodstox-java.6/src/test/java/wstxtest/sax/TestEntityResolver.java	2020-05-04 17:08:08.522865155 +0200
@@ -44,7 +44,7 @@
             assertNotNull(cause);
             assertTrue(cause instanceof WstxException);
             // [woodstox-core#84]: actual message varies by OS so only verify this:
-            verifyException(e, " file ");
+            verifyException(e, "java.io.FileNotFoundException");
             verifyException(e, "no-such-thing.dtd");
         }