virt: Allow more than 26 disks
This commit is contained in:
@@ -46,3 +46,25 @@ func TestExpandHome(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNumToAlpha(t *testing.T) {
|
||||
var numToAlphaTests = []struct {
|
||||
number int
|
||||
result string
|
||||
}{
|
||||
{0, "a"},
|
||||
{25, "z"},
|
||||
{26, "aa"},
|
||||
{27, "ab"},
|
||||
{702, "aaa"},
|
||||
{703, "aab"},
|
||||
{63269, "cool"},
|
||||
}
|
||||
|
||||
for _, test := range numToAlphaTests {
|
||||
actual := numToAlpha(test.number)
|
||||
if actual != test.result {
|
||||
t.Errorf("numToAlpha(%d): expected %s, actual %s", test.number, test.result, actual)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user