2015-11-19 06:21:35 +00:00
|
|
|
Describe "Import-Alias" {
|
2016-03-04 14:42:08 -08:00
|
|
|
$pesteraliasfile = Join-Path -Path (Join-Path $PSScriptRoot -ChildPath assets) -ChildPath pesteralias.txt
|
2016-03-04 14:52:27 -08:00
|
|
|
|
2015-11-19 06:21:35 +00:00
|
|
|
Context "Validate ability to import alias file" {
|
|
|
|
|
|
|
|
|
|
It "Should be able to import an alias file successfully" {
|
2015-11-19 06:46:30 +00:00
|
|
|
{ Import-Alias $pesteraliasfile } | Should Not throw
|
2015-11-19 06:21:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Should be able to import file via the Import-Alias alias of ipal" {
|
2016-03-04 14:52:27 -08:00
|
|
|
{ ipal $pesteraliasfile } | Should Not throw
|
|
|
|
|
}
|
2015-11-19 06:21:35 +00:00
|
|
|
|
2016-03-04 14:52:27 -08:00
|
|
|
It "Should be able to import an alias file and perform imported aliased echo cmd" {
|
2015-11-19 06:21:35 +00:00
|
|
|
(Import-Alias $pesteraliasfile)
|
|
|
|
|
(pesterecho pestertesting) | Should Be "pestertesting"
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-04 14:52:27 -08:00
|
|
|
It "Should be able to use ipal alias to import an alias file and perform cmd" {
|
|
|
|
|
(ipal $pesteraliasfile)
|
2015-11-19 06:21:35 +00:00
|
|
|
(pesterecho pestertesting) | Should be "pestertesting"
|
|
|
|
|
}
|
2016-03-04 14:52:27 -08:00
|
|
|
|
2015-11-19 06:21:35 +00:00
|
|
|
}
|
|
|
|
|
}
|