mirror of
https://codeberg.org/Kankys/doxa.git
synced 2026-11-11 14:44:36 +01:00
12 lines
244 B
Go
12 lines
244 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestTruncate(t *testing.T) {
|
|
result := truncate("Ahoj světe", 5)
|
|
expected := "Ahoj..."
|
|
|
|
if result != expected {
|
|
t.Errorf("Očekáváno %q, ale dostali jsme %q", expected, result)
|
|
}
|
|
} |