Skip to content

Commit

Permalink
Add tests for installing from sources without META files
Browse files Browse the repository at this point in the history
Using the failing examples from skaji#210 and skaji#230
  • Loading branch information
kupietz committed Sep 11, 2024
1 parent bf6890d commit 4f22522
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions xt/37_remote_tar_without_meta_or_module_name.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use strict;
use warnings;
use Test::More;
use lib "xt/lib";
use CLI;

subtest remote_tar_without_meta_or_module_name => sub {
my $r = cpm_install "-v", "https://cpan.metacpan.org/authors/id/G/GC/GCAMPBELL/Data-Diff-0.01.tar.gz";
is $r->exit, 0;
note $r->err;
};

subtest fail => sub {
my $r = cpm_install "-v", "https://cpan.metacpan.org/authors/id/G/GC/GCAMPBELL/Data-Diff-0.01.xxx";
isnt $r->exit, 0;
note $r->err;
};

done_testing;
20 changes: 20 additions & 0 deletions xt/38_git_without_meta_or_module_name.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use strict;
use warnings;
use Test::More;
use lib "xt/lib";
use CLI;

subtest git_without_meta_or_module_name => sub {
my $r = cpm_install "-v", 'https://github.com/ap/[email protected]';
is $r->exit, 0;
note $r->err;
};

subtest fail => sub {
local $ENV{GIT_TERMINAL_PROMPT} = 0;
my $r = cpm_install "-v", 'https://github.com/ap/Async.git@xxxxx';
isnt $r->exit, 0;
note $r->err;
};

done_testing;

0 comments on commit 4f22522

Please sign in to comment.