diff options
| author | mat <github@matdoes.dev> | 2021-12-09 17:28:18 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-09 17:28:18 +0000 |
| commit | 577c2aa5444db727c23ceae565a8648d6f6a41f4 (patch) | |
| tree | cc96eb8cee284cc9303def29f790aaf79e53fb4b /minecraft-chat/tests | |
| parent | 4bf2ef15f9ce6a676834721e00f01608b51c0950 (diff) | |
| download | azalea-drasl-577c2aa5444db727c23ceae565a8648d6f6a41f4.tar.xz | |
add tests for to_ansi
Diffstat (limited to 'minecraft-chat/tests')
| -rw-r--r-- | minecraft-chat/tests/integration_test.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/minecraft-chat/tests/integration_test.rs b/minecraft-chat/tests/integration_test.rs index 9fd9c093..0574861b 100644 --- a/minecraft-chat/tests/integration_test.rs +++ b/minecraft-chat/tests/integration_test.rs @@ -6,10 +6,11 @@ fn test() { let j: Value = serde_json::from_str( r#"{ "text": "hello", - "color": "red" + "color": "red", + "bold": true }"#, ) .unwrap(); let component = Component::new(&j).unwrap(); - println!("println: {}", component.to_ansi(None)); + assert_eq!(component.to_ansi(None), "\x1b[38;2;255;85;85mhello\x1b[m"); } |
