From c0bc51c4c1845df1ded9f0ec1480a3f32f7e9aba Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Thu, 22 May 2008 01:19:16 -0500 Subject: add a test for error handling --- t/100-errors.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 t/100-errors.t (limited to 't') diff --git a/t/100-errors.t b/t/100-errors.t new file mode 100644 index 0000000..8fbd91b --- /dev/null +++ b/t/100-errors.t @@ -0,0 +1,13 @@ +#!perl -T +use strict; +use warnings; +use Test::More tests => 4; +use Test::Exception; +use Language::TECO; + +my $buftext = "this is\nan initial buffer"; +my $te = Language::TECO->new($buftext); +throws_ok { $te->execute("100j") } qr/\? Pointer off page/, + 'moving the pointer off the end of the buffer'; +throws_ok { $te->execute("-10j") } qr/\? Pointer off page/, + 'moving the pointer off the end of the buffer'; -- cgit v1.2.3-54-g00ecf