From 17c373d16c6641ea009f0cef23c40fd7d11f6a08 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Sun, 12 Nov 2023 16:24:03 +0800 Subject: [PATCH] normalized path separators to URL [#38] --- pmtiles/bucket_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmtiles/bucket_test.go b/pmtiles/bucket_test.go index 0c94f9c..9e009e7 100644 --- a/pmtiles/bucket_test.go +++ b/pmtiles/bucket_test.go @@ -10,7 +10,7 @@ import ( func TestNormalizeLocalFile(t *testing.T) { bucket, key, _ := NormalizeBucketKey("", "", "../foo/bar.pmtiles") assert.Equal(t, "bar.pmtiles", key) - assert.True(t, strings.HasSuffix(bucket, "foo")) + assert.True(t, strings.HasSuffix(bucket, "/foo")) assert.True(t, strings.HasPrefix(bucket, "file://")) } @@ -18,7 +18,7 @@ func TestNormalizeLocalFileWindows(t *testing.T) { if string(os.PathSeparator) != "/" { bucket, key, _ := NormalizeBucketKey("", "", "\\foo\\bar.pmtiles") assert.Equal(t, "bar.pmtiles", key) - assert.True(t, strings.HasSuffix(bucket, "\\foo")) + assert.True(t, strings.HasSuffix(bucket, "/foo")) assert.True(t, strings.HasPrefix(bucket, "file://")) } }