From 07b956e3a30d9cd192111829b59bdf4372f128b1 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 6 Jan 2024 19:13:45 +0100 Subject: [PATCH] Fix tests by disabling them --- ...empty-String-in-NamespacedKey.fromSt.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/patches/api/0457-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch b/patches/api/0457-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch index ac07e2076..bb41c5952 100644 --- a/patches/api/0457-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch +++ b/patches/api/0457-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch @@ -38,3 +38,23 @@ index 8ac72cb0b05e2c493d98310f2e87c3714d15c5e3..95bc1078e35a92624b6627e78ed80080 String[] components = string.split(":", 3); if (components.length > 2) { +diff --git a/src/test/java/org/bukkit/NamespacedKeyTest.java b/src/test/java/org/bukkit/NamespacedKeyTest.java +index 6317798e43332f34f79970ded0f023beee868fed..d4e9e24b705a7ac3e9f4fc27eefa44ecb16aa35c 100644 +--- a/src/test/java/org/bukkit/NamespacedKeyTest.java ++++ b/src/test/java/org/bukkit/NamespacedKeyTest.java +@@ -29,6 +29,7 @@ public class NamespacedKeyTest { + assertNull(NamespacedKey.fromString("foo:bar:bazz")); + } + ++ @org.junit.jupiter.api.Disabled // Paper - Fixup NamespacedKey handling + @Test + public void testFromStringEmptyInput() { + assertThrows(IllegalArgumentException.class, () -> NamespacedKey.fromString("")); +@@ -75,6 +76,7 @@ public class NamespacedKeyTest { + "loremipsumdolorsitametconsecteturadipiscingelitduisvolutpatvelitsitametmaximusscelerisquemorbiullamcorperexacconsequategestas").toString(); + } + ++ @org.junit.jupiter.api.Disabled // Paper - Fixup NamespacedKey handling + @Test + public void testAboveLength() { + assertThrows(IllegalArgumentException.class, () -> new NamespacedKey("loremipsumdolorsitametconsecteturadipiscingelitduisvolutpatvelitsitametmaximusscelerisquemorbiullamcorperexacconsequategestas",