avoid surprising string handling behavior

This commit is contained in:
Tshepang Mbambo
2025-11-13 02:03:18 +02:00
parent 6d42077573
commit e4ef199039
+8 -8
View File
@@ -190,7 +190,7 @@ fn lengthen_lines(content: &str, limit: usize) -> String {
#[test]
fn test_sembr() {
let original = "\
let original = "
# some. heading
must! be; split?
1. ignore a dot after number. but no further
@@ -207,7 +207,7 @@ fn test_sembr() {
git log main.. compiler
foo. bar. baz
";
let expected = "\
let expected = "
# some. heading
must!
be;
@@ -276,13 +276,13 @@ fn test_prettify_ignore_link_targets() {
#[test]
fn test_sembr_then_prettify() {
let original = "\
let original = "
hi there. do
not split
short sentences.
hi again.
";
let expected = "\
let expected = "
hi there.
do
not split
@@ -291,7 +291,7 @@ fn test_sembr_then_prettify() {
";
let processed = comply(original);
assert_eq!(expected, processed);
let expected = "\
let expected = "
hi there.
do not split
short sentences.
@@ -299,7 +299,7 @@ fn test_sembr_then_prettify() {
";
let processed = lengthen_lines(&processed, 50);
assert_eq!(expected, processed);
let expected = "\
let expected = "
hi there.
do not split short sentences.
hi again.
@@ -310,12 +310,12 @@ fn test_sembr_then_prettify() {
#[test]
fn test_sembr_question_mark() {
let original = "\
let original = "
o? whatever
r? @reviewer
r? @reviewer
";
let expected = "\
let expected = "
o?
whatever
r? @reviewer