| Index: logdog/common/types/streamname_test.go
|
| diff --git a/logdog/common/types/streamname_test.go b/logdog/common/types/streamname_test.go
|
| index 80650c56f8796e52455f39ab6bba170076ac93b6..897148661ba1fccd0e2ff2bb5e56c2cefa878974 100644
|
| --- a/logdog/common/types/streamname_test.go
|
| +++ b/logdog/common/types/streamname_test.go
|
| @@ -162,6 +162,26 @@ func TestStreamName(t *testing.T) {
|
| })
|
| }
|
| })
|
| +
|
| + Convey(`StreamName.Split`, t, func() {
|
| + for _, tc := range []struct {
|
| + s StreamName
|
| + base StreamName
|
| + last StreamName
|
| + }{
|
| + {"", "", ""},
|
| + {"foo", "", "foo"},
|
| + {"/foo", "", "foo"},
|
| + {"foo/bar", "foo", "bar"},
|
| + {"foo/bar/baz", "foo/bar", "baz"},
|
| + } {
|
| + Convey(fmt.Sprintf(`Stream name %q splits into %q and %q.`, tc.s, tc.base, tc.last), func() {
|
| + base, last := tc.s.Split()
|
| + So(base, ShouldEqual, tc.base)
|
| + So(last, ShouldEqual, tc.last)
|
| + })
|
| + }
|
| + })
|
| }
|
|
|
| func TestStreamPath(t *testing.T) {
|
|
|