#[test]
fn system_prefix_matches() {
let msg = "[System: You just rebuilt yourself from source and restarted]";
assert!(msg.starts_with("[System:"));
}
#[test]
fn uppercase_system_does_not_match() {
let msg = "[SYSTEM: You just rebuilt yourself]";
assert!(!msg.starts_with("[System:"));
}
#[test]
fn normal_user_message_does_not_match() {
let msg = "Hello, how are you?";
assert!(!msg.starts_with("[System:"));
}
#[test]
fn empty_message_does_not_match() {
let msg = "";
assert!(!msg.starts_with("[System:"));
}
#[test]
fn partial_prefix_does_not_match() {
let msg = "[Syste";
assert!(!msg.starts_with("[System:"));
}
#[test]
fn system_lowercase_does_not_match() {
let msg = "[system: something]";
assert!(!msg.starts_with("[System:"));
}