()
| 497 | |
| 498 | #[test] |
| 499 | fn test_dispatch_clear() { |
| 500 | let reg = CommandRegistry::new(); |
| 501 | let ctx = test_ctx(); |
| 502 | let out = reg.dispatch("/clear", &ctx).unwrap(); |
| 503 | assert!(matches!(out.action, Some(CommandAction::ClearHistory))); |
| 504 | assert!(out.text.contains("10")); |
| 505 | } |
| 506 | |
| 507 | #[test] |
| 508 | fn test_dispatch_compact() { |