Skip to content

Commit

Permalink
test Mojo::ByteStream in boolean context
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 27, 2014
1 parent e3941a2 commit 79fe055
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/mojo/bytestream.t
Expand Up @@ -151,4 +151,8 @@ $file = catfile $dir, 'test.txt';
is b("just\nworks!")->spurt($file)->quote, qq{"just\nworks!"}, 'right result';
is b($file)->slurp, "just\nworks!", 'successful roundtrip';

# Boolean context
ok !Mojo::ByteStream->new(0), '"0" is falsy';
ok !!Mojo::ByteStream->new(1), '"1" is truthy';

done_testing();

0 comments on commit 79fe055

Please sign in to comment.