1 package bbcodehtml 2 3 import ( 4 "testing" 5 ) 6 7 func TestColour(t *testing.T) { 8 testAttr(t, []attrinout{ 9 {"RED", []byte("#FF0000")}, 10 {"Red", []byte("#FF0000")}, 11 {"red", []byte("#FF0000")}, 12 {"rED", []byte("#FF0000")}, 13 {"blue", []byte("#0000FF")}, 14 {"#f00", []byte("#f00")}, 15 {"#F00", []byte("#F00")}, 16 {"#FA1258", []byte("#FA1258")}, 17 {"ffffff", []byte("#ffffff")}, 18 {"000", []byte("#000")}, 19 {"Not-A-Colour", nil}, 20 }) 21 } 22