Skip to content

Commit

Permalink
Indentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsee committed Oct 25, 2012
1 parent 4903221 commit fea8452
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions Perl/Encoder/t/400_evil.t
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ use File::Spec;


use lib File::Spec->catdir(qw(t lib)); use lib File::Spec->catdir(qw(t lib));
BEGIN { BEGIN {
lib->import('lib') lib->import('lib')
if !-d 't'; if !-d 't';
} }


use Sereal::TestSet qw(:all); use Sereal::TestSet qw(:all);
use Test::More; use Test::More;


if (not have_encoder_and_decoder()) { if (not have_encoder_and_decoder()) {
plan skip_all => 'Did not find right version of decoder'; plan skip_all => 'Did not find right version of decoder';
} }
else { else {
require Sereal::Decoder; require Sereal::Decoder;
Sereal::Decoder->import(":all"); Sereal::Decoder->import(":all");
} }




Expand All @@ -32,16 +32,16 @@ else {
# tiedness in the output. # tiedness in the output.


SCOPE: { SCOPE: {
package TiedHash; package TiedHash;
require Tie::Hash; require Tie::Hash;
our @ISA = qw(Tie::StdHash); our @ISA = qw(Tie::StdHash);
} }


my %testhash = ( my %testhash = (
foo => [qw(a b c)], foo => [qw(a b c)],
baz => 123, baz => 123,
dfvgbnhmjk => "345ty6ujh", dfvgbnhmjk => "345ty6ujh",
a => undef, a => undef,
); );


my %tied_hash; my %tied_hash;
Expand All @@ -54,13 +54,13 @@ my ($out, $ok, $err, $data);
$ok = eval {$out = encode_sereal(\%tied_hash); 1}; $ok = eval {$out = encode_sereal(\%tied_hash); 1};
$err = $@ || 'Zombie error'; $err = $@ || 'Zombie error';
ok($ok, "serializing tied hash did not die") ok($ok, "serializing tied hash did not die")
or note("Error was '$err'"); or note("Error was '$err'");
ok(defined $out, "serializing tied hash returns string"); ok(defined $out, "serializing tied hash returns string");


$ok = eval {$data = decode_sereal($out); 1;}; $ok = eval {$data = decode_sereal($out); 1;};
$err = $@ || 'Zombie error'; $err = $@ || 'Zombie error';
ok($ok, "deserializing tied hash did not die") ok($ok, "deserializing tied hash did not die")
or note("Error was '$err', data was:\n"), hobodecode($out); or note("Error was '$err', data was:\n"), hobodecode($out);
ok(defined $data, "deserializing tied hash yields defined output"); ok(defined $data, "deserializing tied hash yields defined output");
is_deeply($data, \%testhash, "deserializing tied hash yields expected output"); is_deeply($data, \%testhash, "deserializing tied hash yields expected output");


Expand All @@ -69,9 +69,9 @@ is_deeply($data, \%testhash, "deserializing tied hash yields expected output");
# Now tied arrays. # Now tied arrays.


SCOPE: { SCOPE: {
package TiedArray; package TiedArray;
require Tie::Array; require Tie::Array;
our @ISA = qw(Tie::StdArray); our @ISA = qw(Tie::StdArray);
} }


my @testarray = (1, 2, "foo", "bar", []); my @testarray = (1, 2, "foo", "bar", []);
Expand All @@ -83,23 +83,23 @@ is_deeply(\@tied_array, \@testarray);
$ok = eval {$out = encode_sereal(\@tied_array); 1}; $ok = eval {$out = encode_sereal(\@tied_array); 1};
$err = $@ || 'Zombie error'; $err = $@ || 'Zombie error';
ok($ok, "serializing tied array did not die") ok($ok, "serializing tied array did not die")
or note("Error was '$err'"); or note("Error was '$err'");
ok(defined $out, "serializing tied array returns string"); ok(defined $out, "serializing tied array returns string");


$ok = eval {$data = decode_sereal($out); 1;}; $ok = eval {$data = decode_sereal($out); 1;};
$err = $@ || 'Zombie error'; $err = $@ || 'Zombie error';
ok($ok, "deserializing tied array did not die") ok($ok, "deserializing tied array did not die")
or note("Error was '$err', data was:\n"), hobodecode($out); or note("Error was '$err', data was:\n"), hobodecode($out);
ok(defined $data, "deserializing tied array yields defined output"); ok(defined $data, "deserializing tied array yields defined output");
is_deeply($data, \@testarray, "deserializing tied array yields expected output"); is_deeply($data, \@testarray, "deserializing tied array yields expected output");




# Now tied scalars. # Now tied scalars.


SCOPE: { SCOPE: {
package TiedScalar; package TiedScalar;
require Tie::Scalar; require Tie::Scalar;
our @ISA = qw(Tie::StdScalar); our @ISA = qw(Tie::StdScalar);
} }


my $testscalar = [qw(foo bar baz)]; my $testscalar = [qw(foo bar baz)];
Expand Down

0 comments on commit fea8452

Please sign in to comment.