PkgConfig-LibPkgConf

 view release on metacpan or  search on metacpan

t/util.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use PkgConfig::LibPkgConf::Util qw( argv_split compare_version path_sep path_relocate );

subtest 'argv_split' => sub {

 is_deeply [argv_split("foo bar baz")], [qw( foo bar baz )];

};

subtest 'compare_version' => sub {

  is compare_version('1.2.3', '1.2.3'), 0;
  is compare_version('1.2.3', '1.2.4'), -1;
  is compare_version('1.2.4', '1.2.3'), 1;

};

subtest 'path_sep' => sub {

  like path_sep(), qr{^[;:]$};

};

subtest 'path_relocate' => sub {

  require Cwd;
  
  my $path = Cwd::getcwd();
  
  $path = path_relocate $path;
  
  ok $path, 'called path_relocate';
  
  note "path = $path";

};

done_testing;



( run in 1.123 second using v1.01-cache-2.11-cpan-5511b514fd6 )