pub const NAME: &str = "Locky";
pub const TAGLINE: &str = "每个算法各持一把子密钥,每次加密都用新的 IV,钥匙孔从不泄露秘密";
pub const ASCII: &str = concat!(
" .-------.\n",
" / \\\n",
" .-------------.\n",
" | o o |\n",
" | |\n",
" | ,-. |\n",
" | ( ) |\n",
" | '-' |\n",
" | | |\n",
" '-------------'",
);
pub const SVG: &str = include_str!("../docs/pet.svg");
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn ascii_matches_php_mascot_line_for_line() {
let lines: Vec<&str> = ASCII.lines().collect();
assert_eq!(lines.len(), 10);
assert_eq!(lines[0].trim_start(), ".-------.");
assert_eq!(lines[2].trim_start(), ".-------------.");
assert_eq!(lines[9].trim_start(), "'-------------'");
assert!(!ASCII.ends_with('\n'));
}
#[test]
fn svg_is_inlined_from_docs() {
assert!(SVG.trim_start().starts_with("<svg"));
assert!(SVG.contains("Locky"));
}
#[test]
fn name_and_tagline_are_public() {
assert_eq!(NAME, "Locky");
assert!(!TAGLINE.is_empty());
}
}