/[VRac]/t/07-tape.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /t/07-tape.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 132 - (show annotations)
Sat Aug 4 21:04:05 2007 UTC (16 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 568 byte(s)
Move some tests around and little improvements
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use blib;
7 use lib './lib';
8
9 use Test::More tests => 18;
10 use Data::Dump qw/dump/;
11
12 BEGIN {
13 use_ok( 'Tape' );
14 }
15
16 ok( my $tape = Tape->new(), 'new' );
17
18 isa_ok( $tape, 'Tape' );
19
20 ok( ! $tape->tape, 'empty' );
21 ok( ! $tape->tape_pos, 'no pos' );
22
23 ok( $tape->load_tape( $0 ), 'load' );
24 cmp_ok( $tape->tape_pos, '==', 0, 'pos 0' );
25
26 my $buff;
27 my $len = 10;
28 for ( 1 .. $len ) {
29 ok( $buff .= chr($tape->read_tape), 'read_tape' );
30 }
31
32 my $expect = "\0\0\xFF\xFF\0\0\xFF\xFF\0\0";
33
34 cmp_ok( $buff, 'eq', $expect, 'no tape error :-)' );
35

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26