Skip to content

Commit

Permalink
if no suggestions, then no "did you mean".
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Jan 19, 2013
1 parent e2ce199 commit dce99e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions S32-exceptions/misc.t
Expand Up @@ -342,6 +342,18 @@ if $emits_suggestions {
ok $! ~~ X::Undeclared::Symbols, "huc throws X::Undeclared::Symbols";
is $!.routine_suggestion<huc>, ["&uc"], '&uc is a suggestion';
}

try eval('toolongtomatchanything()');
is +($!.routine_suggestion<toolongtomatchanything>), 0, "no suggestions for a strange name";
ok $!.message !~~ /Did you mean/, "doesn't show suggestions if there are none.";

try eval('class TestClassFactoryInterfaceBridgeMock is TooLongOfANameToBeConsideredGoodPerl { }');
is +($!.suggestions), 0, "no suggestions for a strange class";
ok $!.message !~~ /Did you mean/, "doesn't show suggestions if there are none.";

try eval('$i-just-made-this-up = "yup"');
is +($!.suggestions), 0, "no suggestions for a strange variable";
ok $!.message !~~ /Did you mean/, "doesn't suggest if there's no suggestions.";
}

done;

0 comments on commit dce99e0

Please sign in to comment.