summaryrefslogtreecommitdiffstats
path: root/t/100-errors.t
diff options
context:
space:
mode:
Diffstat (limited to 't/100-errors.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';