Ticket #1185: dos.patch

File dos.patch, 1.2 KB (added by bubaflub, 12 years ago)
  • t/op/00ff-dos.t

    diff --git t/op/00ff-dos.t t/op/00ff-dos.t
    index f20da54..f946781 100644
     
    1 #!perl 
    2 # Copyright (C) 2001-2005, Parrot Foundation. 
     1#! parrot 
     2# Copyright (C) 2001-2009, Parrot Foundation. 
    33# $Id$ 
    44 
    5 use strict; 
    6 use warnings; 
    7 use lib qw( . lib ../lib ../../lib ); 
    8 use Test::More; 
    9 use Parrot::Test tests => 2; 
    10  
    115=head1 NAME 
    126 
    137t/op/00ff-dos.t - DOS File Format 
     
    2216 
    2317=cut 
    2418 
    25 my $code = qq(print "ok\\n"\r\nend\r\n); 
    26 pasm_output_is( $code, <<'OUT', "fileformat dos" ); 
    27 ok 
    28 OUT 
    29  
    30 $code = qq(print "ok\\n"\r\nend\r\n\cZ\r\n); 
    31 pasm_output_is( $code, <<'OUT', "fileformat dos w ctrl-z" ); 
    32 ok 
    33 OUT 
     19.sub main :main 
     20    .include 'test_more.pir' 
     21    plan(2) 
     22 
     23    test_fileformat_dos() 
     24    test_fileformat_dos_ctrl_z() 
     25.end 
     26 
     27.sub test_fileformat_dos 
     28    lives_ok( <<'CODE', 'fileformat dos') 
     29.sub main 
     30    print "42\r\n" 
     31.end 
     32CODE 
     33.end 
     34 
     35.sub test_fileformat_dos_ctrl_z 
     36    lives_ok( <<'CODE', 'fileformat dos w ctrl-z') 
     37.sub main 
     38    print "42\r\n\cZ" 
     39.end 
     40CODE 
     41.end 
    3442 
    3543# Local Variables: 
    3644#   mode: cperl 
    3745#   cperl-indent-level: 4 
    3846#   fill-column: 100 
    3947# End: 
    40 # vim: expandtab shiftwidth=4: 
     48# vim: expandtab shiftwidth=4 filetype=pir: