Auto stash before merge of "develop" and "origin/develop"

This commit is contained in:
2020-11-24 11:25:11 +00:00
parent fd79228199
commit 51d381fb2b
4 changed files with 12 additions and 7 deletions

View File

@@ -1,9 +1,10 @@
#[must_use]
pub fn handify(input: &str) -> String {
let input = input.to_uppercase();
let input = input.trim().to_owned();
let mut input = input.replace(" ", " 👏 ");
let mut input = input.replace(" ", " \u{1f44f} ");
if !input.is_empty() {
input = format!("👏 {} 👏", input);
input = format!("\u{1f44f} {} \u{1f44f}", input);
}
input
}
@@ -11,16 +12,17 @@ pub fn handify(input: &str) -> String {
#[cfg(test)]
mod test {
use super::*;
#[test]
fn handify_test_no_trailing_spaces() {
let input = "hello world";
assert_eq!(handify(input), "👏 HELLO 👏 WORLD 👏");
assert_eq!(handify(input), "\u{1f44f} HELLO \u{1f44f} WORLD \u{1f44f}");
}
#[test]
fn handify_test_with_trailing_spaces() {
let input = " hello world ";
assert_eq!(handify(input), "👏 HELLO 👏 WORLD 👏")
assert_eq!(handify(input), "\u{1f44f} HELLO \u{1f44f} WORLD \u{1f44f}")
}
#[test]