github.com/jbronn/packer@v0.1.6-0.20140120165540-8a1364dbd817/builder/amazon/common/template_funcs_test.go (about) 1 package common 2 3 import ( 4 "testing" 5 ) 6 7 func TestAMITemplatePrepare_clean(t *testing.T) { 8 origName := "AMZamz09(),/-_:&^$%" 9 expected := "AMZamz09(),/-_-----" 10 11 name := templateCleanAMIName(origName) 12 13 if name != expected { 14 t.Fatalf("template names do not match: expected %s got %s\n", expected, name) 15 } 16 }