mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Conver to regular Go vendor + dep tool
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
package pb
|
||||
|
||||
import "testing"
|
||||
|
||||
func Test_RuneCount(t *testing.T) {
|
||||
s := string([]byte{
|
||||
27, 91, 51, 49, 109, // {Red}
|
||||
72, 101, 108, 108, 111, // Hello
|
||||
44, 32, // ,
|
||||
112, 108, 97, 121, 103, 114, 111, 117, 110, 100, // Playground
|
||||
27, 91, 48, 109, // {Reset}
|
||||
})
|
||||
if e, l := 17, escapeAwareRuneCountInString(s); l != e {
|
||||
t.Errorf("Invalid length %d, expected %d", l, e)
|
||||
}
|
||||
s = "進捗 "
|
||||
if e, l := 5, escapeAwareRuneCountInString(s); l != e {
|
||||
t.Errorf("Invalid length %d, expected %d", l, e)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user