virt: Allow more than 26 disks

This commit is contained in:
Jonathan Gold
2017-09-08 00:22:33 +00:00
parent af75696018
commit 69f479b67e
2 changed files with 33 additions and 2 deletions

View File

@@ -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)
}
}
}