From 2d4598c68dc7458bec7838966e70d4a5c20593fd Mon Sep 17 00:00:00 2001 From: linsaftw Date: Fri, 14 Jun 2024 14:29:55 -0300 Subject: [PATCH] Remove better unit tests --- .../0012-Better-unit-tests-for-Chat-API.patch | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 BungeeCord-Patches/0012-Better-unit-tests-for-Chat-API.patch diff --git a/BungeeCord-Patches/0012-Better-unit-tests-for-Chat-API.patch b/BungeeCord-Patches/0012-Better-unit-tests-for-Chat-API.patch deleted file mode 100644 index 0a868e40a..000000000 --- a/BungeeCord-Patches/0012-Better-unit-tests-for-Chat-API.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 7522a16f8f03479cea4f97e8a265b4bfbca898f2 Mon Sep 17 00:00:00 2001 -From: Tux -Date: Thu, 19 May 2016 17:36:31 -0600 -Subject: [PATCH] Better unit tests for Chat API - - -diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java -index 7e14484b..3698762c 100644 ---- a/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java -+++ b/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java -@@ -696,6 +696,26 @@ public class ComponentsTest - assertEquals( testClickEvent, extraGetter.apply( eventRetention, 1 ).getClickEvent() ); - } - -+ @Test -+ public void testBuilderSpecialFormatting() -+ { -+ BaseComponent[] components = new ComponentBuilder( "Hello " ) -+ .bold(true).underlined(true).italic(true).strikethrough(true).obfuscated(true) -+ .append("World").underlined(false).strikethrough(false).create(); -+ -+ assertTrue( components[0].isBold() ); -+ assertTrue( components[0].isUnderlined() ); -+ assertTrue( components[0].isItalic() ); -+ assertTrue( components[0].isStrikethrough() ); -+ assertTrue( components[0].isObfuscated() ); -+ -+ assertTrue( components[1].isBold() ); -+ assertFalse( components[1].isUnderlined() ); -+ assertTrue( components[1].isItalic() ); -+ assertFalse( components[1].isStrikethrough() ); -+ assertTrue( components[1].isObfuscated() ); -+ } -+ - @Test - public void testLoopSimple() - { -diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java -index 47c06baa..2552a34f 100644 ---- a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java -+++ b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java -@@ -25,4 +25,12 @@ public class TranslatableComponentTest - assertEquals( "Test string with a placeholder", BaseComponent.toPlainText( baseComponents ) ); - assertEquals( "§fTest string with §fa§f placeholder", BaseComponent.toLegacyText( baseComponents ) ); - } -+ -+ @Test -+ public void testEscapedPercentInPlainText() -+ { -+ TranslatableComponent testComponent = new TranslatableComponent( "Test string with %% sign" ); -+ assertEquals( "Test string with % sign", testComponent.toPlainText() ); -+ assertEquals( "§fTest string with §f%§f sign", testComponent.toLegacyText() ); -+ } - } --- -2.44.0.windows.1 -