-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for installing from sources without META files
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |