Add a size/precision field to test file, make sure xml parser/producer work fine
[dbsrgits/SQL-Translator.git] / t / 17sqlfxml-producer.t
index 050bc42..5b9fa76 100644 (file)
@@ -297,6 +297,14 @@ $ans = <<EOXML;
           <extra ZEROFILL="1" />
           <comments></comments>
         </field>
+        <field name="bar" data_type="numeric" size="10,2" is_nullable="1" is_auto_increment="0" is_primary_key="0" is_foreign_key="0" order="2">
+          <extra />
+          <comments></comments>
+        </field>
+        <field name="baz" data_type="decimal" size="8,3" is_nullable="1" is_auto_increment="0" is_primary_key="0" is_foreign_key="0" order="3">
+          <extra />
+          <comments></comments>
+        </field>
       </fields>
       <indices></indices>
       <constraints></constraints>
@@ -326,6 +334,18 @@ EOXML
     ) or die $t->error;
     $f->extra(ZEROFILL => "1");
 
+    $t->add_field(
+        name      => "bar",
+        data_type => "numeric",
+        size      => "10,2",
+    ) or die $t->error;
+    $t->add_field(
+        name      => "baz",
+        data_type => "decimal",
+        size      => [8,3],
+    ) or die $t->error;
+
+
     # As we have created a Schema we give translate a dummy string so that
     # it will run the produce.
     lives_ok {$xml =$obj->translate("FOO");} "Translate (Field.extra) ran";