-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
174 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/perl | ||
# | ||
BEGIN { $ENV{LC_ALL} = 'C' } | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Cwd 'abs_path'; | ||
use Test::Most; | ||
|
||
chdir 't/etc/' or die $!; | ||
|
||
$ENV{'HOME'} = abs_path ('.vcsh_home'); | ||
|
||
chdir '.vcsh_home' or die $!; | ||
|
||
my $output = `../vcsh alias`; | ||
ok $output eq "", 'No aliases set up yet.'; | ||
|
||
system("../vcsh alias ls=list"); | ||
$output = `../vcsh alias`; | ||
ok $output eq "ls = list\n", 'Add alias ls'; | ||
|
||
system("../vcsh alias ci=commit -a"); | ||
$output = `../vcsh alias`; | ||
ok $output eq "ls = list | ||
ci = commit -a | ||
", 'Add alias ci'; | ||
|
||
system("../vcsh alias co=upgrade"); | ||
$output = `../vcsh alias`; | ||
ok $output eq "ls = list | ||
ci = commit -a | ||
co = upgrade | ||
", 'Add alias co'; | ||
|
||
$output = `../vcsh alias ci`; | ||
ok $output eq "commit -a\n", 'Get alias ci'; | ||
|
||
system("../vcsh alias -d ci"); | ||
$output = `../vcsh alias`; | ||
ok $output eq "ls = list | ||
co = upgrade | ||
", 'Delete alias ci'; | ||
|
||
done_testing; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters