Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix sanity test, brrt++ for spotting
  • Loading branch information
lizmat committed May 7, 2015
1 parent 89c43cc commit 6b4f9be
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions t/01-sanity/54-use-lib.t
Expand Up @@ -7,24 +7,24 @@ plan 17;
my $start = +@?INC;

use cur <foo>;
is @?INC[0], 'foo', 'can we force a (default) CURLF';
is +@?INC, $start + 1, 'did we add it to @?INC? (1)';
is @?INC[0], 'file#foo', 'can we force a (default) CURLF';
is +@?INC, $start + 1, 'did we add it to @?INC? (1)';

use cur <file:bar>;
is @?INC[0], 'file:bar', 'can we force a specific CURLF';
is @?INC[1], 'foo', 'do we have the previous entry moved up (1)';
use cur <file#bar>;
is @?INC[0], 'file#bar', 'can we force a specific CURLF';
is @?INC[1], 'file#foo', 'do we have the previous entry moved up (1)';
is +@?INC, $start + 2, 'did we add it to @?INC? (2)';

{
use cur <inst:baz>;
is @?INC[0], 'inst:baz', 'can we add in a scope with another CURLF id';
is @?INC[1], 'file:bar', 'do we have the previous entry moved up (2)';
is @?INC[2], 'foo', 'do we have the previous entry moved up (3)';
use cur <inst#baz>;
is @?INC[0], 'inst#baz', 'can we add in a scope with another CURLF id';
is @?INC[1], 'file#bar', 'do we have the previous entry moved up (2)';
is @?INC[2], 'file#foo', 'do we have the previous entry moved up (3)';
is +@?INC, $start + 3, 'did we add it to @?INC? (3)';
}

is @?INC[0], 'file:bar', 'did we revert to previous setting';
is @?INC[1], 'foo', 'do we have the previous entry moved down again';
is @?INC[0], 'file#bar', 'did we revert to previous setting';
is @?INC[1], 'file#foo', 'do we have the previous entry moved down again';
is +@?INC, $start + 2, 'did we revert number of elements';

throws_like( { @?INC[0] = "boom" },
Expand Down

0 comments on commit 6b4f9be

Please sign in to comment.