Added BUG notes and test about single tags e.g. <foo/>
[dbsrgits/SQL-Translator.git] / t / 16xml-parser.t
index be7372a..eee29df 100644 (file)
@@ -10,7 +10,7 @@
 # Tests that;
 #
 
-use Test::More tests => 78;
+use Test::More;
 use Test::Exception;
 
 use strict;
@@ -68,6 +68,8 @@ sub test_field {
 # Testing 1,2,3,4...
 #=============================================================================
 
+plan tests => 89;
+
 use SQL::Translator;
 use SQL::Translator::Schema::Constants;
 
@@ -97,9 +99,9 @@ is_deeply( \@tblnames, [qw/Basic/], "tables");
 # Basic
 my $tbl = $scma->get_table("Basic");
 is $tbl->order, 1, "Basic->order";
-is_deeply( [map {$_->name} $tbl->get_fields],
-    [qw/id title description email explicitnulldef explicitemptystring/] , 
-    "Table Basic's fields");
+is_deeply( [map {$_->name} $tbl->get_fields], [qw/
+    id title description email explicitnulldef explicitemptystring singletagdef
+/] , "Table Basic's fields");
 test_field($tbl->get_field("id"),{
     name => "id",
     order => 1,
@@ -148,6 +150,13 @@ test_field($tbl->get_field("explicitemptystring"),{
     default_value => "",
     is_nullable => 1,
 });
+test_field($tbl->get_field("singletagdef"),{
+    name => "singletagdef",
+    order => 7,
+    data_type => "varchar",
+    default_value => "",
+    is_nullable => 1,
+});
 
 my @indices = $tbl->get_indices;
 is scalar(@indices), 1, "Table basic has 1 index";