This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git
The following commit(s) were added to refs/heads/master by this push:
new e28be4f5 Quieten test: only show output on failure
e28be4f5 is described below
commit e28be4f5ec3bd3fb3d0e9aed33101f68b9024732
Author: Sebb <[email protected]>
AuthorDate: Sun Dec 22 12:51:08 2024 +0000
Quieten test: only show output on failure
Most JVMs should behave OK now...
---
.../validator/routines/DomainValidatorTest.java | 39 +++++++++++-----------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git
a/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
b/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
index c1da81d9..e8a12448 100644
---
a/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
+++
b/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
@@ -491,27 +491,28 @@ public class DomainValidatorTest {
// Check if IDN.toASCII is broken or not
@Test
public void testIsIDNtoASCIIBroken() {
- System.out.println(">>DomainValidatorTest.testIsIDNtoASCIIBroken()");
final String input = ".";
- final boolean ok = input.equals(IDN.toASCII(input));
- System.out.println("IDN.toASCII is " + (ok ? "OK" : "BROKEN"));
- final String[] props = { "java.version", // Java Runtime Environment
version
- "java.vendor", // Java Runtime Environment vendor
- "java.vm.specification.version", // Java Virtual Machine
specification version
- "java.vm.specification.vendor", // Java Virtual Machine
specification vendor
- "java.vm.specification.name", // Java Virtual Machine
specification name
- "java.vm.version", // Java Virtual Machine implementation
version
- "java.vm.vendor", // Java Virtual Machine implementation vendor
- "java.vm.name", // Java Virtual Machine implementation name
- "java.specification.version", // Java Runtime Environment
specification version
- "java.specification.vendor", // Java Runtime Environment
specification vendor
- "java.specification.name", // Java Runtime Environment
specification name
- "java.class.version", // Java class format version number
- };
- for (final String t : props) {
- System.out.println(t + "=" + System.getProperty(t));
+ if (!input.equals(IDN.toASCII(input))) {
+
System.out.println(">>DomainValidatorTest.testIsIDNtoASCIIBroken()");
+ System.out.println("IDN.toASCII is BROKEN");
+ final String[] props = { "java.version", // Java Runtime
Environment version
+ "java.vendor", // Java Runtime Environment vendor
+ "java.vm.specification.version", // Java Virtual Machine
specification version
+ "java.vm.specification.vendor", // Java Virtual Machine
specification vendor
+ "java.vm.specification.name", // Java Virtual Machine
specification name
+ "java.vm.version", // Java Virtual Machine implementation
version
+ "java.vm.vendor", // Java Virtual Machine implementation
vendor
+ "java.vm.name", // Java Virtual Machine implementation name
+ "java.specification.version", // Java Runtime Environment
specification version
+ "java.specification.vendor", // Java Runtime Environment
specification vendor
+ "java.specification.name", // Java Runtime Environment
specification name
+ "java.class.version", // Java class format version number
+ };
+ for (final String t : props) {
+ System.out.println(t + "=" + System.getProperty(t));
+ }
+
System.out.println("<<DomainValidatorTest.testIsIDNtoASCIIBroken()");
}
- System.out.println("<<DomainValidatorTest.testIsIDNtoASCIIBroken()");
assertTrue(true); // dummy assertion to satisfy lint
}