From 0c0b05ab6bde446e0fd88f57d3ee990b328643ac Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 7 Jul 2012 22:04:54 +1200 Subject: [PATCH] Add a test case for descriptions that contain UTF-8. --- t/15-unicode.t | 16 ++++++++++++++++ t/xml/wide-character.xml | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 t/15-unicode.t create mode 100644 t/xml/wide-character.xml diff --git a/t/15-unicode.t b/t/15-unicode.t new file mode 100644 index 0000000..e80e9ff --- /dev/null +++ b/t/15-unicode.t @@ -0,0 +1,16 @@ +#!usr/bin/perl -w + +use strict; +use Test::More tests => 3; +use FindBin qw/$Bin/; + +my $xml = "$Bin/xml/wide-character.xml"; + +# Test that the guide data warning is present. +my $out = `$Bin/../bin/mythtv-status -d --file $xml 2>&1`; + +#diag($out); + +like($out, qr/MythTV status for localhost/, 'Header is present'); +unlike($out, qr/Wide character in print/m, 'No warning about wide characters'); +like($out, qr/measurements – with/,' Description contains wide character'); diff --git a/t/xml/wide-character.xml b/t/xml/wide-character.xml new file mode 100644 index 0000000..2543445 --- /dev/null +++ b/t/xml/wide-character.xml @@ -0,0 +1,21 @@ + + + + + + + The couples begin their first room renovation and Mark challenges them to build a wall to his exact measurements – with a prize that will turn the competition upside down. + + + + + + + + + + + + + + -- 2.30.2