cvsuser 04/12/23 15:08:02
Modified: t/pmc scratchpad.t
Log:
Tests for find_lex op
Revision Changes Path
1.8 +31 -2 parrot/t/pmc/scratchpad.t
Index: scratchpad.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/scratchpad.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- scratchpad.t 1 Oct 2004 21:16:52 -0000 1.7
+++ scratchpad.t 23 Dec 2004 23:08:02 -0000 1.8
@@ -1,6 +1,6 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: scratchpad.t,v 1.7 2004/10/01 21:16:52 jrieks Exp $
+# $Id: scratchpad.t,v 1.8 2004/12/23 23:08:02 scog Exp $
=head1 NAME
@@ -16,7 +16,7 @@
=cut
-use Parrot::Test tests => 5;
+use Parrot::Test tests => 9;
output_is(<<CODE, <<OUTPUT, "direct set and get on scratchpad pmc");
new_pad P20, 0
@@ -225,5 +225,34 @@
Lexical 'foo' not found
/
OUTPUT
+
+output_like(<<'CODE', <<'OUTPUT', "find_lex -- non-existent variable #1");
+ find_lex P1, 1
+ end
+CODE
+/Lexical #'1' not found/
+OUTPUT
+
+output_like(<<'CODE', <<'OUTPUT', "find_lex -- non-existent variable #2");
+ find_lex P1, 1, 2
+ end
+CODE
+/Lexical #'2' not found/
+OUTPUT
+
+output_like(<<'CODE', <<'OUTPUT', "find_lex -- non-existent variable #3");
+ find_lex P1, 'wibble'
+ end
+CODE
+/Lexical 'wibble' not found/
+OUTPUT
+
+output_like(<<'CODE', <<'OUTPUT', "find_lex -- non-existent variable #4");
+ find_lex P1, 1, 'bibble'
+ end
+CODE
+/Lexical 'bibble' not found/
+OUTPUT
+
1;