File: GtkSourceStyle.t

package info (click to toggle)
libgtk2-sourceview2-perl 0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 236 kB
  • ctags: 28
  • sloc: perl: 1,066; ansic: 58; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (2)
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
32
33
#!/usr/bin/perl

use strict;
use warnings;

use Gtk2::TestHelper tests => 2;

use FindBin;
use lib "$FindBin::Bin";
use my_helper;

use Glib qw(TRUE FALSE);
use Gtk2::SourceView2;

exit tests();


sub tests {
	test_properties();
	return 0;
}


sub test_properties {
	my $manager = Gtk2::SourceView2::StyleSchemeManager->get_default();
	my ($id) = $manager->get_scheme_ids();
	my $scheme = $manager->get_scheme($id);

	my $style = $scheme->get_style('def:comment');
	isa_ok($style, 'Gtk2::SourceView2::Style');
	my $copy = $style->copy();
	isa_ok($copy, 'Gtk2::SourceView2::Style');
}