Permalink
Browse files

Merge branch 'master' of github.com:duckduckgo/p5-app-duckpan

  • Loading branch information...
2 parents 8e21f34 + 9373bbd commit a5edd943f271edb320dc0dc31663be9fb53d2f25 @Getty Getty committed Feb 20, 2013
Showing with 10 additions and 10 deletions.
  1. +1 −1 lib/App/DuckPAN/CmdBase/Env.pm
  2. +9 −9 t/system_duckpan_env.t
@@ -63,7 +63,7 @@ sub show_usage {
my ( $self ) = @_;
if (keys %{$self->load_env_ini}) {
print STDOUT "# ENV variables added so far:\n";
- $self->show_env($_) for (keys %{$self->load_env_ini});
+ $self->show_env($_) for (sort keys %{$self->load_env_ini});
print STDOUT "\n";
}
printf STDERR "Usage:\n";
View
@@ -30,23 +30,23 @@ sub grepEnv {
}
callDuckPAN($test_var, $test_val);
-#grepEnv($test_var, $test_val, "$test_var = $test_val", 1,
-# 'added new environment variable to ~/.duckpan/env.ini');
-
-callDuckPAN('rm', $test_var);
-grepEnv($test_var, $test_val, "$test_var = $test_val", 0,
- 'deleted new environment variable from ~/.duckpan/env.ini');
+grepEnv($test_var, $test_val, "$test_var = $test_val", 1,
+ 'added new environment variable to ~/.duckpan/env.ini');
my ($return, $out, $err) = callDuckPAN();
open my $ini, '<', $config_file;
my $expected = join "", "# ENV variables added so far:\n",
- (map { s/ = (.*)$/='$1'/; "export $_" } <$ini>), "\n";
+ (sort map { s/ = (.*)$/='$1'/; "export $_" } <$ini>), "\n";
my $usage = "Usage:\n"
. " add ENV:\tduckpan env <name> <value>\n"
. " get ENV:\tduckpan env <name>\n"
. " remove ENV:\tduckpan rm <name>\n";
-#is($out, $expected, 'got current env variables from `duckpan show`');
-is($err, $usage, 'got usage from `duckpan show` on stderr');
+is($out, $expected, 'got current env variables from `duckpan env`');
+is($err, $usage, 'got usage from `duckpan env` on stderr');
close $ini;
+callDuckPAN('rm', $test_var);
+grepEnv($test_var, $test_val, "$test_var = $test_val", 0,
+ 'deleted new environment variable from ~/.duckpan/env.ini');
+
done_testing;

0 comments on commit a5edd94

Please sign in to comment.