From: Andrew Ruthven Date: Sat, 7 Jul 2012 10:04:54 +0000 (+1200) Subject: Add a test case for descriptions that contain UTF-8. X-Git-Tag: debian-sid-0.10.2-1~1 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c0b05ab6bde446e0fd88f57d3ee990b328643ac;p=mythtv-status.git Add a test case for descriptions that contain UTF-8. --- 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. + + + + + + + + + + + + + +