summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-24 17:01:03 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-24 17:01:03 -0500
commite192b197474d284ce7cc4b8689decce5b4b75c84 (patch)
tree495e0bee671e9c6e353d7d57e9e533fddd8cb6df
parent02aeadc9a10c86f4cdf0a83d75c79529fdbe6df8 (diff)
downloadlanguage-teco-e192b197474d284ce7cc4b8689decce5b4b75c84.tar.gz
language-teco-e192b197474d284ce7cc4b8689decce5b4b75c84.zip
expand the printing test a bit
-rw-r--r--t/022-printing.t7
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");