4 |
|
|
5 |
my $debug = shift @ARGV; |
my $debug = shift @ARGV; |
6 |
|
|
7 |
use Test::More tests => 24; |
use Test::More tests => 28; |
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
9 |
use Cwd qw/abs_path/; |
use Cwd qw/abs_path/; |
10 |
use File::Slurp; |
use File::Slurp; |
35 |
|
|
36 |
write_file( $dump_path, dump( $state ) ) unless ( -e $dump_path ); |
write_file( $dump_path, dump( $state ) ) unless ( -e $dump_path ); |
37 |
|
|
38 |
diag "$path ? $dump_path"; |
diag "$path ? $dump_path" if $debug; |
39 |
|
|
40 |
my $hash = read_file( $dump_path ), "read_file( $dump_path )"; |
ok( my $hash = read_file( $dump_path ), "read_file( $dump_path )" ); |
41 |
ok ( $hash = eval "$hash", 'eval' ); |
ok ( $hash = eval "$hash", 'eval' ); |
42 |
|
|
43 |
is_deeply( $state, $hash, 'same' ); |
is_deeply( $state, $hash, 'same' ); |