~ubuntu-branches/ubuntu/lucid/pdl/lucid

« back to all changes in this revision

Viewing changes to t/opengl.t

  • Committer: Bazaar Package Importer
  • Author(s): Henning Glawe
  • Date: 2003-12-13 22:25:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20031213222541-m2sq55fevk74h93c
Tags: 1:2.4.0-1
* new maintainer (Closes: #215543)
* acknowlege NMU (Closes: #141117, #104630, #140104, #170182)
* new upstream release.
* enable plplot support (Closes: #196185)
* enable gsl support
* enable fftw support
* swap out m51.fits and COPYING, taken from PDL CVS HEAD (Closes: #223793)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
# use PDL::Graphics::OpenGL;
12
12
 
 
13
sub hasDISPLAY {
 
14
  return defined $ENV{DISPLAY} && $ENV{DISPLAY} !~ /^\s*$/;
 
15
}
13
16
 
14
17
use Test;
15
18
 
16
19
BEGIN { 
17
20
  use PDL::Config;
18
 
  if( $PDL::Config{OPENGL_LIBS} && $PDL::Config{WITH_3D} ){
 
21
  if( $PDL::Config{OPENGL_LIBS} && $PDL::Config{WITH_3D} 
 
22
      # only if GL modules have actually been built
 
23
      && $PDL::Config{GL_BUILD} && hasDISPLAY()) {
19
24
         plan tests => 3; 
20
25
         eval 'use PDL::Graphics::OpenGL';
21
26
         ok($@, ''); 
22
27
  }else{
23
28
         plan tests => 1; 
24
 
         print "ok 1 # Skipped: OpenGL support not compiled\n";
 
29
         print hasDISPLAY() ? "ok 1 # Skipped: OpenGL support not compiled\n"
 
30
           : "ok 1 # Skipped: DISPLAY environment variable not set\n";
25
31
         exit;
26
32
  }
27
33
}