From f4ea2ba4f844157a0f43a4398264b3391c324770 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Wed, 26 Aug 2015 11:17:52 -0700 Subject: [PATCH] added tests from CR --- src/pester-tests/Test-Split-Path.Tests.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pester-tests/Test-Split-Path.Tests.ps1 b/src/pester-tests/Test-Split-Path.Tests.ps1 index ec3283057b..cfd7ada3ed 100644 --- a/src/pester-tests/Test-Split-Path.Tests.ps1 +++ b/src/pester-tests/Test-Split-Path.Tests.ps1 @@ -31,7 +31,9 @@ } It "Should return the parent folder name when the leaf switch is used" { - Split-Path /usr/bin -Leaf | Should be "bin" + Split-Path /usr/bin -Leaf | Should be "bin" + Split-Path /usr/local/bin -Leaf | Should be "bin" + Split-Path usr/bin -Leaf | Should be "bin" } It "Should be able to accept regular expression input and output an array for multiple objects" { @@ -68,7 +70,9 @@ } It "Should return the path up to the parent of the directory when Parent switch is used" { - Split-Path "/usr/bin" -Parent | Should Be "/usr" + Split-Path "/usr/bin" -Parent | Should Be "/usr" + Split-Path "/usr/local/bin" -Parent | Should Be "/usr/local" + Split-Path "usr/local/bin" -Parent | Should Be "usr/local" } It "Should throw if a parameterSetName is incorrect" {