/[ttyrec]/jsttyplay/t/parser/03_parse_char.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 /jsttyplay/t/parser/03_parse_char.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Tue Feb 17 18:12:32 2009 UTC (15 years, 2 months ago) by dpavlin
File MIME type: application/x-troff
File size: 724 byte(s)
import upstream from http://encryptio.com/code/jsttyplay

1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4
5 use Test::More tests => 9;
6
7 use Term::Emulator::Parser;
8
9 my $term = Term::Emulator::Parser->new(width => 5, height => 2);
10
11 $term->parse("abc");
12 is($term->as_string, "abc \n ");
13 $term->parse("def");
14 is($term->as_string, "abcde\nf ");
15 $term->parse("gh");
16 is($term->as_string, "abcde\nfgh ");
17 $term->parse("ijklmn");
18 is($term->as_string, "fghij\nklmn ");
19 $term->parse("opq\012rst");
20 is($term->as_string, "pq \nrst ");
21 $term->parse("\015uv");
22 is($term->as_string, "pq \nuvt ");
23 $term->parse("\010w");
24 is($term->as_string, "pq \nuwt ");
25 $term->parse("\010\010x");
26 is($term->as_string, "pq \nxwt ");
27 $term->parse("\010\010y");
28 is($term->as_string, "pq \nywt ");
29

  ViewVC Help
Powered by ViewVC 1.1.26