~ubuntu-branches/ubuntu/maverick/perl-tk/maverick

« back to all changes in this revision

Viewing changes to t/KR.t

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2010-05-30 09:19:40 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100530091940-wbmq9bloo92t9m6x
Tags: 1:804.029-1
* New Upstream Release (Closes: #578814).
* Added debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
use Tk;
2
 
use Tk::Config ();
3
 
use Encode qw(FB_CROAK);
4
 
BEGIN
5
 
{
6
 
 my $Xft = $Tk::Config::xlib =~ /-lXft\b/;
7
 
 if (!$Xft) # assume we have CJK charsets with ttf fonts available
8
 
  {
9
 
   my $enc = Tk::SystemEncoding();
10
 
   eval { $enc->encode("\x{AC00}",FB_CROAK) };
11
 
   if ($@)
12
 
    {
13
 
     my $err = "$@";
14
 
     print "1..0 # Skipped: locale's '",$enc->name,"' cannot represent Korean.\n";
15
 
     CORE::exit(0);
16
 
    }
17
 
  }
18
 
}
 
2
## Be optimistic, run the test everywhere.
 
3
## It won't fail if fonts are missing, just
 
4
## empty lines will be shown.
 
5
# use Tk::Config ();
 
6
# use Encode qw(FB_CROAK);
 
7
# BEGIN
 
8
# {
 
9
#  my $Xft = $Tk::Config::xlib =~ /-lXft\b/;
 
10
#  if (!$Xft) # assume we have CJK charsets with ttf fonts available
 
11
#   {
 
12
#    my $enc = Tk::SystemEncoding();
 
13
#    eval { $enc->encode("\x{AC00}",FB_CROAK) };
 
14
#    if ($@)
 
15
#     {
 
16
#      my $err = "$@";
 
17
#      print "1..0 # Skipped: locale's '",$enc->name,"' cannot represent Korean.\n";
 
18
#      CORE::exit(0);
 
19
#     }
 
20
#   }
 
21
# }
19
22
use Test::More (tests => 271);
20
23
use Tk::widgets qw(Text);
21
24
my $mw   = MainWindow->new;