[svn:parrot] r47801 - trunk/t/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Jun 24 06:24:41 UTC 2010


Author: NotFound
Date: Thu Jun 24 06:24:41 2010
New Revision: 47801
URL: https://trac.parrot.org/parrot/changeset/47801

Log:
some FileHandle isatty tests

Modified:
   trunk/t/pmc/filehandle.t

Modified: trunk/t/pmc/filehandle.t
==============================================================================
--- trunk/t/pmc/filehandle.t	Thu Jun 24 06:15:17 2010	(r47800)
+++ trunk/t/pmc/filehandle.t	Thu Jun 24 06:24:41 2010	(r47801)
@@ -7,7 +7,7 @@
 use lib qw( . lib ../lib ../../lib );
 
 use Test::More;
-use Parrot::Test tests => 20;
+use Parrot::Test tests => 21;
 use Parrot::Test::Util 'create_tempfile';
 use Parrot::Test::Util 'create_tempfile';
 
@@ -95,6 +95,24 @@
 ok 7 - $P7.open($S1, $S2) # new file, write mode succeeds
 OUT
 
+pir_output_is( <<'CODE', <<'OUT', 'isatty' );
+.sub 'test' :main
+    .local pmc fh
+    .local int i
+    fh = new ['FileHandle']
+    i = fh.'isatty'()
+    print i
+    say ' unopened FileHandle is not a tty'
+    fh.'open'('README')
+    i = fh.'isatty'()
+    print i
+    say ' regular file is not a tty'
+.end
+CODE
+0 unopened FileHandle is not a tty
+0 regular file is not a tty
+OUT
+
 SKIP: {
     skip 'no asynch calls yet' => 1;
 


More information about the parrot-commits mailing list