diff --git a/radicle-cli/src/terminal/patch.rs b/radicle-cli/src/terminal/patch.rs index 6ffde699..2640687c 100644 --- a/radicle-cli/src/terminal/patch.rs +++ b/radicle-cli/src/terminal/patch.rs @@ -337,67 +337,64 @@ mod test { let res = create_display_message(&repo, &commit_0, &commit_0).unwrap(); assert_eq!( - r#" - -"# - .trim_start(), + "\ + \n\ + ", res ); let res = create_display_message(&repo, &commit_0, &commit_1).unwrap(); assert_eq!( - r#" -commit 1 - - -"# - .trim_start(), + "\ + commit 1\n\ + \n\ + \n\ + ", res ); let res = create_display_message(&repo, &commit_0, &commit_2).unwrap(); assert_eq!( - r#" - - -commit 1 - - - -commit 2 - - -"# - .trim_start(), + "\ + \n\ + \n\ + commit 1\n\ + \n\ + \n\ + \n\ + commit 2\n\ + \n\ + \n\ + ", res ); } @@ -406,22 +403,21 @@ and description. fn test_edit_display_message() { let res = edit_display_message("title", "The patch description."); assert_eq!( - r#" -title - -The patch description. - - -"# - .trim_start(), + "\ + title\n\ + \n\ + The patch description.\n\ + \n\ + \n\ + ", res ); } @@ -443,39 +439,36 @@ and description. let res = update_display_message(&repo, &commit_1, &commit_1).unwrap(); assert_eq!( - r#" - -"# - .trim_start(), + "\ + \n\ + ", res ); let res = update_display_message(&repo, &commit_1, &commit_2).unwrap(); assert_eq!( - r#" -commit 2 - - -"# - .trim_start(), + "\ + commit 2\n\ + \n\ + \n\ + ", res ); let res = update_display_message(&repo, &commit_1, &commit_squashed).unwrap(); assert_eq!( - r#" - -"# - .trim_start(), + "\ + \n\ + ", res ); }