Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Altai-man committed Jun 14, 2016
1 parent 1f88471 commit 450a98b
Showing 1 changed file with 43 additions and 10 deletions.
53 changes: 43 additions & 10 deletions t/10-testing.t
Expand Up @@ -6,15 +6,48 @@ use lib 'lib';
use Config::Netrc;

my Str $text = q:to/EOI/;
# this is my netrc with default
machine m
login l # this is my username
password p
default
login default_login # this is my default username
password default_password
EOI
ok parse($text); # TODO more tests to add;
# this is my netrc
machine m
login l # cool login
password p # cool password
default
login default_login # default username
password default_password
EOI

ok parse($text) !~~ Nil;

$text = q:to/EOI/;
# only default
default
login ld
password pd
EOI

ok parse($text) !~~ Nil;


$text = q:to/EOI/;
machine m
login l
EOI

ok parse($text) !~~ Nil;

$text = q:to/EOI/;
machine m
login l # comment
password p # easy case
EOI

ok parse($text) !~~ Nil;

$text = q:to/EOI/;
machine m
password p # with only password
EOI

ok parse($text) !~~ Nil;

done-testing;

0 comments on commit 450a98b

Please sign in to comment.