Thanks,
David Christensen
-------
Index: hyper.t
===================================================================
--- hyper.t (revision 2039)
+++ hyper.t (working copy)
@@ -9,7 +9,7 @@
=cut
-plan 22;
+plan 30;
{ # binary infix
my @r;
@@ -85,7 +85,7 @@
todo_is(~@r, ~@e, "hyper op on assignment/pipeline ASCII notation");
};
-{ # dimention upgrade
+{ # dimension upgrade
my @r;
eval '@r = (1, 2, 3) »+« 1';
my @e = (2, 3, 4);
@@ -102,6 +102,39 @@
@r = 2 >>*<< (10, 20, 30);
@e = (20, 40, 60);
is(~@r, ~@e, "auto dimension upgrade on lhs ASCII notation");
+
+ @r = (1,2,3,4) »+« (1,2);
+ @e = (2,4,3,4);
+ is(~@r, ~@e, "list-level element extension on rhs");
+
+ @r = (1,2,3,4) >>+<< (1,2);
+ @e = (2,4,3,4);
+ is(~@r, ~@e, "list-level element extension on rhs ASCII notation");
+
+ @r = (1,2) »+« (1,2,3,4);
+ @e = (2,4,3,4);
+ is(~@r, ~@e, "list-level element extension on lhs");
+
+ @r = (1,2) >>+<< (1,2,3,4);
+ @e = (2,4,3,4);
+ is(~@r, ~@e, "list-level element extension on lhs ASCII notation");
+
+ @r = (1,2,3,4) »+« (1,);
+ @e = (2,2,3,4);
+ is(~@r, ~@e, "list-level element extension on rhs");
+
+ @r = (1,2,3,4) >>+<< (1,);
+ @e = (2,2,3,4);
+ is(~@r, ~@e, "list-level element extension on rhs ASCII notation");
+
+ @r = (1,) »+« (1,2,3,4);
+ @e = (2,2,3,4);
+ is(~@r, ~@e, "list-level element extension on lhs");
+
+ @r = (1,) >>+<< (1,2,3,4);
+ @e = (2,2,3,4);
+ is(~@r, ~@e, "list-level element extension on lhs ASCII notation");
+
};
{ # unary postfix again, but with a twist
@@ -114,4 +147,3 @@
@e = (1, 2, 3);
todo_is(~@r, ~@e);
};
-
Nice, applied.
> Let me know if the unicode ">>" are coming
> through correctly; I am not seeing them as such in my email.
Indeed it looks broken to me. So much for iso-8859-1 compatibility...
Would you like a committer bit? :-)
Thanks,
/Autrijus/
Your mailer claims that your message is ISO-8859-1
> +
> + @r = (1,2,3,4) »+« (1,2);
./perl -Ilib -MEncode -wle '$m = "»+«";print$u = Encoddee::::e"macroman", $m); print Encode::decode ("utf8", $u)'
»+«
»+«
What you're actually sending in the body is the utf8 bytes converted in a
ISO-8859-1 => MacRoman translation. (I think)
Did you cut and paste from (say) TextEdit into Mail?
IIRC both TextEdit and carbonised Emacs have an annoying habit of assuming
that by default files are in MacRoman.
Nicholas Clark