1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2025-05-19 22:43:13 +02:00
2024-02-12 15:25:44 +03:00

16 lines
275 B
Go

package protobuf
import "testing"
func TestFindLastGoodPos(t *testing.T) {
s := "123456\n789"
pos1 := FindLastGoodPos(s, "5")
if pos1 < 0 {
t.Error("FindLastGoodPos() error: ", pos1)
}
s2 := s[pos1:]
if s2 != "789" {
t.Error("FindLastGoodPos() error: ", s2)
}
}