Convert to Test::More
[p5sagit/p5-mst-13.2.git] / pp.c
diff --git a/pp.c b/pp.c
index 0ddfefe..8b58c16 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -2258,7 +2258,7 @@ PP(pp_complement)
              while (tmps < send) {
                  UV c = utf8n_to_uvchr(tmps, send-tmps, &l, UTF8_ALLOW_ANYUV);
                  tmps += UTF8SKIP(tmps);
-                 result = uvchr_to_utf8(result, ~c);
+                 result = uvchr_to_utf8_flags(result, ~c, UNICODE_ALLOW_ANY);
              }
              *result = '\0';
              result -= targlen;
@@ -3148,7 +3148,8 @@ PP(pp_chr)
 
     if (value > 255 && !IN_BYTES) {
        SvGROW(TARG, UNISKIP(value)+1);
-       tmps = (char*)uvchr_to_utf8((U8*)SvPVX(TARG), value);
+       tmps = (char*)uvchr_to_utf8_flags((U8*)SvPVX(TARG), value,
+                                         UNICODE_ALLOW_SUPER);
        SvCUR_set(TARG, tmps - SvPVX(TARG));
        *tmps = '\0';
        (void)SvPOK_only(TARG);
@@ -3179,12 +3180,12 @@ PP(pp_crypt)
     char *tmps = SvPV(left, len);
     char *t    = 0;
     if (DO_UTF8(left)) {
-         /* If Unicode take the crypt() of the low 8 bits
-         * of the characters of the string. */
+         /* If Unicode take the crypt() of the low 8 bits of
+         * the characters of the string.  Yes, we made this up.  */
         char *s    = tmps;
         char *send = tmps + len;
         STRLEN i   = 0;
-        Newz(688, t, len, char);
+        Newz(688, t, len + 1, char);
         while (s < send) {
              t[i++] = utf8_to_uvchr((U8*)s, 0) & 0xFF;
              s += UTF8SKIP(s);