add Volume Ids column only for max 100 volumes for convenience in the master ui.
This commit is contained in:
14
weed/util/inits_test.go
Normal file
14
weed/util/inits_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHumanReadableInts(t *testing.T) {
|
||||
assert.Equal(t, "1-3", HumanReadableInts(1, 2, 3))
|
||||
assert.Equal(t, "1 3", HumanReadableInts(1, 3))
|
||||
assert.Equal(t, "1 3 5", HumanReadableInts(5, 1, 3))
|
||||
assert.Equal(t, "1-3 5", HumanReadableInts(1, 2, 3, 5))
|
||||
assert.Equal(t, "1-3 5 7-9", HumanReadableInts(7, 9, 8, 1, 2, 3, 5))
|
||||
}
|
||||
Reference in New Issue
Block a user