~ubuntu-branches/ubuntu/intrepid/graphicsmagick/intrepid

« back to all changes in this revision

Viewing changes to PerlMagick/t/x/write.t

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2006-05-06 16:28:08 UTC
  • Revision ID: james.westby@ubuntu.com-20060506162808-vt2ni3r5nytcszms
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/perl
 
2
# Copyright (C) 2003 GraphicsMagick Group
 
3
# Copyright (C) 2002 ImageMagick Studio
 
4
# Copyright (C) 1991-1999 E. I. du Pont de Nemours and Company
 
5
#
 
6
# This program is covered by multiple licenses, which are described in
 
7
# Copyright.txt. You should have received a copy of Copyright.txt with this
 
8
# package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
 
9
#
 
10
#
 
11
# Test accessing X11 server
 
12
#
 
13
# Contributed by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
 
14
#
 
15
 
 
16
BEGIN { $| = 1; $test=1; print "1..1\n"; }
 
17
END {print "not ok $test\n" unless $loaded;}
 
18
use Graphics::Magick;
 
19
$loaded=1;
 
20
 
 
21
require 't/subroutines.pl';
 
22
 
 
23
chdir 't/x' || die 'Cd failed';
 
24
 
 
25
#
 
26
# 1) Test reading and displaying an image
 
27
#
 
28
if ( defined($ENV{'DISPLAY'}) ) {
 
29
  $image=Graphics::Magick->new;
 
30
  $x=$image->ReadImage('congrats.miff');
 
31
  if( "$x" ) {
 
32
    print "not ok $test\n";
 
33
  } else {
 
34
    $x = $image->Display(delay=>800);
 
35
    if( "$x" ) {
 
36
      print "not ok $test\n";
 
37
    } else {
 
38
      print "ok $test\n";
 
39
    }
 
40
  }
 
41
  undef $image;
 
42
} else {
 
43
  print "ok $test\n";
 
44
}
 
45
 
 
46
$test = 0;  # Quench PERL compliaint
 
47