1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-26 23:10:42 +02:00

сделал StringSplitBylength_WithLastWord()

This commit is contained in:
Nikitin Aleksandr
2025-05-27 17:56:08 +03:00
parent d2d4378cde
commit 5a1ebf303d
2 changed files with 54 additions and 0 deletions

View File

@@ -1543,3 +1543,11 @@ func TestStringSplitBylength(t *testing.T) {
t.Errorf("Expected 'Приве', but got %s", MassOtvet[0])
}
}
func TestStringSplitBylength_WithLastWord(t *testing.T) {
Text1 := "Привет мир"
MassOtvet := StringSplitBylength_WithLastWord(Text1, 5, ' ')
if MassOtvet[0] != "Приве" {
t.Errorf("Expected 'Приве', but got %s", MassOtvet[0])
}
}