Commits

Anonymous committed 7a344db

Added the directory dump.

Comments (0)

Files changed (2)

File-Dir-Dumper/lib/File/Dir/Dumper/Scanner.pm

 
     $self->_queue([]);
 
-    $self->_add({ type => "header", dir_to_dump => $dir_to_dump});
+    $self->_add({ type => "header", dir_to_dump => $dir_to_dump, stream_type => "Directory Dump"});
     
     return;
 }

File-Dir-Dumper/t/dumper.t

 use strict;
 use warnings;
 
-use Test::More tests => 28;
+use Test::More tests => 30;
 
 use POSIX qw(mktime strftime);
 use File::Path;
         "dir_to_dump is OK."
     );
 
+    # TEST
+    is ($token->{stream_type}, "Directory Dump",
+        "stream_type is OK."
+    );
+
     $token = $scanner->fetch();
 
     # TEST
     # TEST
     ok (!defined($token), "Token is undefined - reached end.");
 
+    $token = $scanner->fetch();
+
+    # TEST
+    ok (!defined($token), "Token is undefined - make sure we don't restart");
+
     rmtree($t->get_path($test_dir))
 }