cvsuser 04/03/19 01:20:39
Modified: imcc imcc.l
t/op basic.t
Log:
[BUG] imcc: no newline at end of file
New test for the reported bug.
Courtesy of Jens Rieks <[EMAIL PROTECTED]>
Revision Changes Path
1.94 +2 -1 parrot/imcc/imcc.l
Index: imcc.l
===================================================================
RCS file: /cvs/public/parrot/imcc/imcc.l,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -w -r1.93 -r1.94
--- imcc.l 14 Mar 2004 09:45:39 -0000 1.93
+++ imcc.l 19 Mar 2004 09:20:36 -0000 1.94
@@ -414,7 +414,8 @@
<emit,INITIAL>{WS}+ /* skip */;
-<emit,INITIAL>. {
+<emit,cmt1,cmt2,cmt3,cmt4,cmt5,INITIAL>. {
+ /* catch all except for state macro */
return yytext[0];
}
1.16 +14 -2 parrot/t/op/basic.t
Index: basic.t
===================================================================
RCS file: /cvs/public/parrot/t/op/basic.t,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -r1.15 -r1.16
--- basic.t 8 Mar 2004 00:19:58 -0000 1.15
+++ basic.t 19 Mar 2004 09:20:39 -0000 1.16
@@ -1,6 +1,6 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: basic.t,v 1.15 2004/03/08 00:19:58 chromatic Exp $
+# $Id: basic.t,v 1.16 2004/03/19 09:20:39 leo Exp $
=head1 NAME
@@ -18,7 +18,7 @@
use strict;
-use Parrot::Test tests => 21;
+use Parrot::Test tests => 22;
# It would be very embarrassing if these didnt work...
output_is(<<'CODE', '', "noop, end");
@@ -205,6 +205,18 @@
CODE
/^\w{2}\s\d\s+$/
+OUTPUT
+
+my $CODE = '##PIR##
+.sub _main
+ print "ok\n"
+ end
+.end
+
+#.namespace'; # no \n at end of file
+
+output_like( $CODE, <<'OUTPUT', "end of line handling");
+/unexpected/
OUTPUT
1; # HONK