aboutsummaryrefslogtreecommitdiff
path: root/weed/util/inits_test.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2020-05-29 16:15:33 +0800
committerbingoohuang <bingoo.huang@gmail.com>2020-05-29 16:15:33 +0800
commit1f8782a1ed504e5f7e7b62218bcf4502903d350f (patch)
tree6dad9d73f5fd3dbe96fbdf2d3eb0b018fae5a84a /weed/util/inits_test.go
parent1a642b98769ea604dfb74fa4d875bf42c24fda9f (diff)
downloadseaweedfs-1f8782a1ed504e5f7e7b62218bcf4502903d350f.tar.xz
seaweedfs-1f8782a1ed504e5f7e7b62218bcf4502903d350f.zip
try showing the first 100 volume ids and an extra ...
Diffstat (limited to 'weed/util/inits_test.go')
-rw-r--r--weed/util/inits_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/util/inits_test.go b/weed/util/inits_test.go
index f1ccb4f7b..f2c9b701f 100644
--- a/weed/util/inits_test.go
+++ b/weed/util/inits_test.go
@@ -5,6 +5,11 @@ import (
"testing"
)
+func TestHumanReadableIntsMax(t *testing.T) {
+ assert.Equal(t, "1-2 ...", HumanReadableIntsMax(2, 1, 2, 3))
+ assert.Equal(t, "1 3 ...", HumanReadableIntsMax(2, 1, 3, 5))
+}
+
func TestHumanReadableInts(t *testing.T) {
assert.Equal(t, "1-3", HumanReadableInts(1, 2, 3))
assert.Equal(t, "1 3", HumanReadableInts(1, 3))