diff --git a/src/processor_test.go b/src/processor_test.go index aa8b8ad..0042be5 100644 --- a/src/processor_test.go +++ b/src/processor_test.go @@ -27,6 +27,11 @@ func TestProcessLine(t *testing.T) { t.Errorf("Got %s wanted foobar", r1) } + processor.ProcessLine("CREATE TABLE `admin_user` (") + processor.ProcessLine(" `firstname` varchar(32) DEFAULT NULL COMMENT 'User First Name'") + processor.ProcessLine(") ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Admin User Table'") + processor.ProcessLine("/*!40101 SET character_set_client = @saved_cs_client */;") + r2 := processor.ProcessLine("INSERT INTO `admin_user` (`firstname`) VALUES ('bob');") if strings.Contains(r2, "bob") { t.Error("Got bob wanted no bob") @@ -43,6 +48,12 @@ func TestProcessLine(t *testing.T) { } } + processor.ProcessLine("CREATE TABLE `customer_entity_varchar` (") + processor.ProcessLine(" `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',") + processor.ProcessLine(" `value` varchar(255) DEFAULT NULL COMMENT 'Value'") + processor.ProcessLine(") ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Customer Entity Varchar';") + processor.ProcessLine("/*!40101 SET character_set_client = @saved_cs_client */;") + r4 := processor.ProcessLine("INSERT INTO `customer_entity_varchar` (`attribute_id`, `value`) VALUES (1, 'bob');") if strings.Contains(r4, "bob") { t.Error("Got bob wanted no bob")