Skip to content

Commit

Permalink
added clone tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 7, 2012
1 parent 63a6957 commit 9d98bb4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/mojo/bytestream.t
Expand Up @@ -5,7 +5,7 @@ use utf8;
# "Homer, we're going to ask you a few simple yes or no questions.
# Do you understand?
# Yes. *lie dectector blows up*"
use Test::More tests => 40;
use Test::More tests => 42;

use File::Spec::Functions qw(catfile splitdir);
use FindBin;
Expand Down Expand Up @@ -120,6 +120,12 @@ $stream = b('0');
is $stream->size, 1, 'size is 1';
is $stream->to_string, '0', 'right content';

# clone
$stream = b('foo');
my $clone = $stream->clone;
isnt $stream->b64_encode->to_string, 'foo', 'original changed';
is $clone->to_string, 'foo', 'clone did not change';

# say and autojoin
my $buffer = '';
open my $handle, '>', \$buffer;
Expand Down

0 comments on commit 9d98bb4

Please sign in to comment.