File: 10-versions.t

package info (click to toggle)
libcrypt-gcrypt-perl 1.26-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: perl: 237; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (6)
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
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 20-versions.t'

#########################

use Test;
use ExtUtils::testlib;
use Crypt::GCrypt;

#########################
BEGIN { plan tests => 3 }; # <--- number of tests;


my $g = Crypt::GCrypt::gcrypt_version();
my $x = Crypt::GCrypt::built_against_version();

warn sprintf("gcrypt version: %s\n built against: %s\n", $g, $x);

ok($g);
ok($x);

# since this is presumably being run at build time, we expect these
# versions to be the same.  Note that in a running environment, it
# might be possible for gcrypt to be a newer version than the version
# the package was built against. (i.e. the admin might have upgraded
# libgcrypt without rebuilding Crypt::GCrypt)

ok($g eq $x);