diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-24 17:01:03 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-24 17:01:03 -0500 |
commit | e192b197474d284ce7cc4b8689decce5b4b75c84 (patch) | |
tree | 495e0bee671e9c6e353d7d57e9e533fddd8cb6df /t | |
parent | 02aeadc9a10c86f4cdf0a83d75c79529fdbe6df8 (diff) | |
download | language-teco-e192b197474d284ce7cc4b8689decce5b4b75c84.tar.gz language-teco-e192b197474d284ce7cc4b8689decce5b4b75c84.zip |
expand the printing test a bit
Diffstat (limited to 't')
-rw-r--r-- | t/022-printing.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/022-printing.t b/t/022-printing.t index e6c0d52..7655319 100644 --- a/t/022-printing.t +++ b/t/022-printing.t @@ -12,7 +12,7 @@ my %tests = ( 10 => ["this is\nan", "this is\nan", "an", " initial buffer", " initial buffer"], 25 => ["this is\nan initial buffer", "this is\nan initial buffer", "an initial buffer", "", ""], ); -plan tests => 1 + map { @{ $tests{$_} } } keys %tests; +plan tests => 6 + map { @{ $tests{$_} } } keys %tests; my $buftext = "this is\nan initial buffer"; my $te = Language::TECO->new($buftext); @@ -25,3 +25,8 @@ for my $pos (keys %tests) { } is($te->execute("ht"), "this is\nan initial buffer", "ht prints the whole buffer"); +is($te->execute("1,5t"), "his ", "1,5t works"); +is($te->execute("-5,6t"), "this i", "printing a range off the beginning"); +is($te->execute("20,30t"), "uffer", "printing a range off the end"); +is($te->execute("-5,30t"), "this is\nan initial buffer", "printing off both ends"); +is($te->execute("5,1t"), "his ", "backwards range"); |