File: fi03debug.t

package info (click to toggle)
libpostscript-file-perl 1.05-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 216 kB
  • ctags: 84
  • sloc: perl: 2,037; makefile: 7
file content (47 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl
use strict;
use warnings;

use Test;
BEGIN { plan tests => 7 };
use PostScript::File qw(check_file);
ok(1); # module found

my $ps = new PostScript::File(
    headings => 1,
    paper => "A5",
    landscape => 1,
    left => 36,
    right => 36,
    top => 72,
    bottom => 72,
    clipping => 1,
    clipcmd => "stroke",
    errors => 1,
    debug => 2,
    );
ok($ps); # object created

$ps->add_to_page( <<END_PAGE );
    /Helvetica findfont 
    12 scalefont 
    setfont
    100 150 moveto
    (hello world) show
    111
    222
    (some text)
    [ 33 (in an array) 55 ]
    666
END_PAGE
my $page = $ps->get_page_label();
ok($page, "1");
ok($ps->get_page());

my $name = "fi03debug";
$ps->output( $name, "test-results" );
ok(1); # survived so far
my $file = check_file( "$name.ps", "test-results" );
ok($file);
ok(-e $file);