1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-25 23:09:22 +00:00

Fix invalid test

This commit is contained in:
Pierre HUBERT 2021-03-06 18:50:23 +01:00
parent f659f0349d
commit 8ba47aa0df

View File

@ -97,11 +97,11 @@ pub fn check_emoji_code(shortcut: &str) -> bool {
/// Check the validity of an HTML color /// Check the validity of an HTML color
/// ///
/// ``` /// ```
/// use comunic_server::utils::string_utils::check_emoji_code; /// use comunic_server::utils::string_utils::check_html_color;
/// ///
/// assert_eq!(check_emoji_code("AAFF00"), true); /// assert_eq!(check_html_color("AAFF00"), true);
/// assert_eq!(check_emoji_code("ABC"), false); /// assert_eq!(check_html_color("ABC"), false);
/// assert_eq!(check_emoji_code("UUFF00"), false); /// assert_eq!(check_html_color("UUFF00"), false);
/// ``` /// ```
pub fn check_html_color(color: &str) -> bool { pub fn check_html_color(color: &str) -> bool {
let r = Regex::new(r"^[A-F0-9]{6}$").unwrap(); let r = Regex::new(r"^[A-F0-9]{6}$").unwrap();