summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");