From e192b197474d284ce7cc4b8689decce5b4b75c84 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Sat, 24 May 2008 17:01:03 -0500 Subject: expand the printing test a bit --- t/022-printing.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3-54-g00ecf