[svn:parrot] r42304 - trunk/t/op

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Fri Nov 6 10:45:33 UTC 2009


Author: dukeleto
Date: Fri Nov  6 10:45:30 2009
New Revision: 42304
URL: https://trac.parrot.org/parrot/changeset/42304

Log:
[t][TT #1185] Convert t/op/00ff-dos.t to PIR, tweaked version of bubaflub++'s initial patch

Modified:
   trunk/t/op/00ff-dos.t

Modified: trunk/t/op/00ff-dos.t
==============================================================================
--- trunk/t/op/00ff-dos.t	Fri Nov  6 09:08:05 2009	(r42303)
+++ trunk/t/op/00ff-dos.t	Fri Nov  6 10:45:30 2009	(r42304)
@@ -1,13 +1,7 @@
-#!perl
-# Copyright (C) 2001-2005, Parrot Foundation.
+#!parrot
+# Copyright (C) 2001-2009, Parrot Foundation.
 # $Id$
 
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 2;
-
 =head1 NAME
 
 t/op/00ff-dos.t - DOS File Format
@@ -22,19 +16,36 @@
 
 =cut
 
-my $code = qq(print "ok\\n"\r\nend\r\n);
-pasm_output_is( $code, <<'OUT', "fileformat dos" );
-ok
-OUT
-
-$code = qq(print "ok\\n"\r\nend\r\n\cZ\r\n);
-pasm_output_is( $code, <<'OUT', "fileformat dos w ctrl-z" );
-ok
-OUT
+.sub main :main
+    .include 'test_more.pir'
+    plan(2)
+
+    test_fileformat_dos()
+    say 'hello!'
+    test_fileformat_dos_ctrl_z()
+    say 'goodbye'
+
+.end
+
+.sub test_fileformat_dos
+    lives_ok( <<"CODE", 'fileformat dos')
+.sub main
+    $I0 = 42\r\n
+.end
+CODE
+.end
+
+.sub test_fileformat_dos_ctrl_z
+    lives_ok( <<"CODE", 'fileformat dos w ctrl-z')
+.sub main
+    $I0 = 42\r\n\cZ
+.end
+CODE
+.end
 
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4
 #   fill-column: 100
 # End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 filetype=pir:


More information about the parrot-commits mailing list