From 17d58d75abdf8bb2a0486925a590a9a036e04722 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Fri, 31 Oct 2008 09:57:37 +0100 Subject: [PATCH] Update ppport.h to 3.14_05 (mhx++) 5.6.x DDisplay ()'s UTF8 different --- ChangeLog | 4 +++- t/21_DDisplay.t | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 22 deletions(-) rewrite t/21_DDisplay.t (81%) diff --git a/ChangeLog b/ChangeLog index 06a44fa..8cb0254 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ -2008-10-23 0.24 - H.Merijn Brand +2008-10-31 0.24 - H.Merijn Brand * Implement DDisplay () * Implement triplevar () + * Update ppport.h to 3.14_05 (mhx++) + * 5.6.x DDisplay ()'s UTF8 different 2008-10-21 0.23 - H.Merijn Brand diff --git a/t/21_DDisplay.t b/t/21_DDisplay.t dissimilarity index 81% index 3077604..5853caf 100644 --- a/t/21_DDisplay.t +++ b/t/21_DDisplay.t @@ -1,21 +1,26 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Test::More tests => 9; - -use Data::Peek; - -is (DDisplay (undef), '', 'undef has no PV'); -is (DDisplay (0), '', '0 has no PV'); -is (DDisplay (\undef), '', '\undef has no PV'); -is (DDisplay (\0), '', '\0 has no PV'); -is (DDisplay (sub {}), '', 'code has no PV'); - -is (DDisplay (""), '""', 'empty string'); -is (DDisplay ("a"), '"a"', '"a"'); -is (DDisplay ("\n"), '"\n"', '"\n"'); -is (DDisplay ("\x{20ac}"), '"\x{20ac}"', '"\n"'); - -1; +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More tests => 9; + +use Data::Peek; + +is (DDisplay (undef), '', 'undef has no PV'); +is (DDisplay (0), '', '0 has no PV'); +is (DDisplay (\undef), '', '\undef has no PV'); +is (DDisplay (\0), '', '\0 has no PV'); +is (DDisplay (sub {}), '', 'code has no PV'); + +is (DDisplay (""), '""', 'empty string'); +is (DDisplay ("a"), '"a"', '"a"'); +is (DDisplay ("\n"), '"\n"', '"\n"'); +if ($] < 5.008) { + is (DDisplay ("\x{20ac}"), '"\342\202\254"', '"\n"'); + } +else { + is (DDisplay ("\x{20ac}"), '"\x{20ac}"', '"\n"'); + } + +1; -- 2.11.4.GIT