We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e445f8 commit dbbea15Copy full SHA for dbbea15
S32-io/io-handle.t
@@ -3,7 +3,7 @@ use lib <t/spec/packages>;
3
use Test;
4
use Test::Util;
5
6
-plan 23;
+plan 24;
7
8
my $path = "io-handle-testfile";
9
@@ -188,3 +188,17 @@ subtest '.encoding attribute' => {
188
is-deeply $fh.encoding, 'bin', 'attribute got set (bin)';
189
}
190
191
+
192
+subtest '.perl.EVAL roundtrips' => {
193
+ plan 7;
194
195
+ my $orig = IO::Handle.new: :path("foo".IO), :!chomp, :nl-in[<I ♥ Perl 6>],
196
+ :nl-out<foo>, :encoding<ascii>;
197
198
+ is-deeply IO::Handle.perl.EVAL, IO::Handle, 'type object';
199
+ given $orig.perl.EVAL -> $evaled {
200
+ is-deeply $evaled, $orig, 'instance';
201
+ is-deeply $evaled."$_"(), $orig."$_"(), $_
202
+ for <path chomp nl-in nl-out encoding>;
203
+ }
204
+}
0 commit comments