summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-22 01:19:16 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-22 01:19:16 -0500
commitc0bc51c4c1845df1ded9f0ec1480a3f32f7e9aba (patch)
treed40713947b053019f6e3f1a5e56011c2b6b20864 /t
parentf6b40ec7ef93584552635e280fb7f6c1d92cd032 (diff)
downloadlanguage-teco-c0bc51c4c1845df1ded9f0ec1480a3f32f7e9aba.tar.gz
language-teco-c0bc51c4c1845df1ded9f0ec1480a3f32f7e9aba.zip
add a test for error handling
Diffstat (limited to 't')
-rw-r--r--t/100-errors.t13
1 files changed, 13 insertions, 0 deletions
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';