osdb/src/branding.rs

37 lines
803 B
Rust
Raw Normal View History

#[cfg(test)]
use insta::assert_snapshot;
pub fn startup_msg() -> String {
2025-05-30 15:48:02 +02:00
let authors = env!("CARGO_PKG_AUTHORS");
let about = about_msg();
let shorthelp = shorthelp_msg();
format!(
"{about}\n\n\
Copyright 2025 {authors}. All rights reserved.\n\n\
{shorthelp}"
)
}
pub fn about_msg() -> String {
let name = env!("CARGO_PKG_NAME");
let version = env!("CARGO_PKG_VERSION");
format!(
2025-05-30 15:48:02 +02:00
"{name} v{version} -- A database engine\n\
Note: This is experimental software. No maintenance is intendend."
)
}
pub fn shorthelp_msg() -> String {
String::from(
"Type .license for licensing information\n\
Type .help for usage information",
)
}
#[test]
fn test_startup_msg() {
assert_snapshot!(startup_msg())
}