// file: crates/ksp-logging-lib/unit_tests/domain.rs // version: 1 #[test] fn wildcard_domain_matches_with_or_without_current_domain() { super::set_current_domain(std::option::Option::None); assert!(super::current_domain_matches(&["*".to_string()])); super::set_current_domain(std::option::Option::Some("logging")); assert!(super::current_domain_matches(&["*".to_string()])); } #[test] fn named_domain_requires_current_matching_prefix() { super::set_current_domain(std::option::Option::None); assert!(!super::current_domain_matches(&["logging".to_string()])); super::set_current_domain(std::option::Option::Some("logging.runtime")); assert!(super::current_domain_matches(&["logging".to_string()])); assert!(super::current_domain_matches(&["store".to_string(), "logging.runtime".to_string()])); assert!(!super::current_domain_matches(&["store".to_string()])); }