优化结构
This commit is contained in:
@@ -100,6 +100,15 @@ func TestNormalizeDeletePrefix(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBoundedPrefixKeepsDirectoryBoundary(t *testing.T) {
|
||||
if got := boundedPrefix("uploads/chunks/1", "uploads/chunks/1/"); got != "uploads/chunks/1/" {
|
||||
t.Fatalf("boundedPrefix() = %q", got)
|
||||
}
|
||||
if got := boundedPrefix("uploads/chunks/1", "uploads/chunks/1"); got != "uploads/chunks/1" {
|
||||
t.Fatalf("boundedPrefix() changed ordinary prefix to %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdvanceDeletePrefixCursor(t *testing.T) {
|
||||
if _, err := advanceDeletePrefixCursor("cursor", "cursor", true); err == nil {
|
||||
t.Fatal("same cursor should fail")
|
||||
|
||||
Reference in New Issue
Block a user