From 0dce5f56ce8c4ec0eb3ee4eb6c09b20956242dfa Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 10 Dec 2021 18:03:28 +0000 Subject: add formatting to some motds --- minecraft-chat/tests/integration_test.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'minecraft-chat/tests') diff --git a/minecraft-chat/tests/integration_test.rs b/minecraft-chat/tests/integration_test.rs index 4c8a39aa..a454ad3b 100644 --- a/minecraft-chat/tests/integration_test.rs +++ b/minecraft-chat/tests/integration_test.rs @@ -65,3 +65,10 @@ fn complex_ansi_test() { ) ); } + +#[test] +fn component_from_string() { + let j: Value = serde_json::from_str("\"foo\"").unwrap(); + let component = Component::new(&j).unwrap(); + assert_eq!(component.to_ansi(None), "foo"); +} -- cgit v1.2.3