[Bps-public-commit] r17060 - in Prophet/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Dec 1 11:25:16 EST 2008


Author: sunnavy
Date: Mon Dec  1 11:25:14 2008
New Revision: 17060

Added:
   Prophet/trunk/t/aliases.t
Modified:
   Prophet/trunk/   (props changed)

Log:
 r17973 at sunnavys-mb:  sunnavy | 2008-12-02 00:24:49 +0800
 add first aliases tests


Added: Prophet/trunk/t/aliases.t
==============================================================================
--- (empty file)
+++ Prophet/trunk/t/aliases.t	Mon Dec  1 11:25:14 2008
@@ -0,0 +1,26 @@
+#!/usr/bin/perl 
+#
+use warnings;
+use strict;
+use Prophet::Test 'no_plan';
+use File::Temp qw/tempfile/;
+
+$ENV{'PROPHET_APP_CONFIG'} = (tempfile())[1];
+
+use_ok('Prophet::CLI');
+use_ok('Prophet::Config');
+my $aliases = Prophet::Config->new(app_handle =>
+        Prophet::CLI->new->app_handle)->aliases;
+# default aliases is empty
+is_deeply( $aliases, {} );
+
+my $out = run_command( 'aliases',
+    '--add', q{pull -a=pull --all},
+);
+
+like($out, qr/added alias 'pull -a = pull --all'/);
+
+unlink $ENV{'PROPHET_APP_CONFIG'};
+
+#TODO XXX
+#more tests soon



More information about the Bps-public-commit mailing list