Permalink
Browse files

a few tests for Ecosystem::suggest_project.

  • Loading branch information...
1 parent 0e28b81 commit 082ce93241c9cff77d529afee353f9b156b507b8 @timo committed May 24, 2013
Showing with 10 additions and 2 deletions.
  1. +7 −1 t/ecosystem.t
  2. +3 −1 t/fakeprojects
View
@@ -1,7 +1,7 @@
use Test;
use Panda::Ecosystem;
use Panda::Project;
-plan 9;
+plan 14;
my $absent = Panda::Project::absent;
my $installed = Panda::Project::installed;
@@ -33,6 +33,12 @@ is $b.dependencies[0], 'some', 'dependencies 1';
is $b.dependencies[1], 'thing', 'dependencies 2';
is $b.dependencies[2], 'else', 'dependencies 3';
+is $a.suggest-project("Frob-Frob"), "Frob::Frob", 'suggestions 1';
+is $a.suggest-project("Frob_Frob"), "Frob::Frob", 'suggestions 2';
+is $a.suggest-project("frobfrob"), "Frob::Frob", 'suggestions 3';
+is $a.suggest-project("Adventure::Engine"), "Adventure-Engine", 'suggestions 4';
+is $a.suggest-project("Adventure_engine"), "Adventure-Engine", 'suggestions 5';
+
unlink "{cwd}/REMOVEME";
# vim: ft=perl6
View
@@ -4,5 +4,7 @@
"depends" : [ "some", "thing", "else" ]
},
{ "name" : "bar", "version" : "2", "source-type" : "hg" },
- { "name" : "baz", "version" : "3" }
+ { "name" : "baz", "version" : "3" },
+ { "name" : "Frob::Frob", "version" : "2", "source-type" : "hg" },
+ { "name" : "Adventure-Engine", "version" : "5" }
]

0 comments on commit 082ce93

Please sign in to comment.