File: zz-cleanup.t

package info (click to toggle)
libgeo-libproj-ffi-perl 1.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: perl: 1,339; makefile: 11
file content (33 lines) | stat: -rw-r--r-- 614 bytes parent folder | download
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
#!perl
use strict;
use warnings;
use lib 'lib';

use Test::More;
use Test::Exception;
my $no_warnings;
use if $no_warnings = $ENV{AUTHOR_TESTING} ? 1 : 0, 'Test::Warnings';

# Cleanup
# https://proj.org/development/reference/functions.html#cleanup

plan tests => 1 + $no_warnings;

use Geo::LibProj::FFI qw( :all );


my ($c, $p);


eval {
	$c = proj_context_create();
	proj_context_use_proj4_init_rules($c, 1);
	$p = proj_create_crs_to_crs($c, "+init=epsg:25832", "+init=epsg:25833", 0);
	proj_destroy($p) if $p;
};
eval { proj_context_destroy($c) } if $c;

lives_ok { proj_cleanup() } 'cleanup';


done_testing;