2013-09-07 21:42:50 -04:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAMITemplatePrepare_clean(t *testing.T) {
|
2015-06-10 17:19:36 -04:00
|
|
|
origName := "AMZamz09(),/-_:&^ $%"
|
|
|
|
expected := "AMZamz09(),/-_--- --"
|
2013-09-07 21:42:50 -04:00
|
|
|
|
|
|
|
name := templateCleanAMIName(origName)
|
|
|
|
|
|
|
|
if name != expected {
|
|
|
|
t.Fatalf("template names do not match: expected %s got %s\n", expected, name)
|
|
|
|
}
|
|
|
|
}
|