5 my $debug = shift @ARGV;
7 use Test::More tests => 213;
8 use Data::Dump qw/dump/;
12 use_ok('CWMP::Queue');
15 #use Cwd qw/abs_path/;
16 #ok(my $abs_path = abs_path($0), "abs_path");
17 #$abs_path =~ s!/[^/]*$!/!; #!fix-vim
19 ok( my $obj = CWMP::Queue->new({
23 isa_ok( $obj, 'CWMP::Queue' );
25 for my $i ( 1 .. 42 ) {
34 while ( my $job = $obj->dequeue ) {
35 ok( $job, "dequeue $i" );
36 ok( my $dispatch = $job->dispatch, "dispatch $i" );
37 cmp_ok( $dispatch->{i}, '==', $i, "i == $i" );
38 ok( $job->finish, "finish $i" );