File: PangoScript.t

package info (click to toggle)
libpango-perl 1.227-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 572 kB
  • sloc: perl: 1,116; ansic: 35; makefile: 9
file content (31 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl
use strict;
use warnings;
use lib qw(t/inc);
use PangoTestHelper tests => 8;

SKIP: {
  skip("PangoScript is new in 1.4", 8)
    unless (Pango -> CHECK_VERSION(1, 4, 0));

  is(Pango::Script -> for_unichar("a"), "latin");

  my $lang = Pango::Script -> get_sample_language("latin");
  isa_ok($lang, "Pango::Language");
  is($lang -> includes_script("latin"), 1);

  my $iter = Pango::ScriptIter -> new("urgs");
  isa_ok($iter, "Pango::ScriptIter");

  my ($start, $end, $script) = $iter -> get_range();
  is($start, "urgs");
  is($end, "");
  is($script, "latin");

  ok(!$iter -> next());
}

__END__

Copyright (C) 2004 by the gtk2-perl team (see the file AUTHORS for the
full list).  See LICENSE for more information.