From c02b29847f38f30628168f06215f7e221f32cb26 Mon Sep 17 00:00:00 2001 From: George Fleming Date: Mon, 29 Feb 2016 08:31:47 -0800 Subject: [PATCH 1/5] Bump libpsl-native --- src/libpsl-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpsl-native b/src/libpsl-native index 8650c6a6a1..19dbaaf54c 160000 --- a/src/libpsl-native +++ b/src/libpsl-native @@ -1 +1 @@ -Subproject commit 8650c6a6a1f782361d49191e935eef616f190155 +Subproject commit 19dbaaf54cfa47c0673af6a3da2c4dad5fb56e8f From b1edc1f03912e7c77e2b38c9cd78b9c250dc1562 Mon Sep 17 00:00:00 2001 From: George Fleming Date: Tue, 1 Mar 2016 10:12:47 -0800 Subject: [PATCH 2/5] Bump monad --- src/monad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monad b/src/monad index 07f23acd10..e0dc79b074 160000 --- a/src/monad +++ b/src/monad @@ -1 +1 @@ -Subproject commit 07f23acd10f2158031ca876d74788236d0aa9e83 +Subproject commit e0dc79b0744bba098e931a8266df97da478eccda From 5ab50a183fba5841f1896f8c1fbb9321b1379b5c Mon Sep 17 00:00:00 2001 From: George Fleming Date: Mon, 29 Feb 2016 10:09:30 -0800 Subject: [PATCH 3/5] New test for symlink of directory --- test/powershell/New-Item.Tests.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/powershell/New-Item.Tests.ps1 b/test/powershell/New-Item.Tests.ps1 index c5f33a4103..60e6000192 100644 --- a/test/powershell/New-Item.Tests.ps1 +++ b/test/powershell/New-Item.Tests.ps1 @@ -9,14 +9,21 @@ { Remove-Item $FullyQualifiedFolder -Recurse -Force } + + if (Test-Path $FullyQualifiedLink) + { + Remove-Item $FullyQualifiedLink -Force + } } Describe "New-Item" { $tmpDirectory = $TestDrive $testfile = "testfile.txt" $testfolder = "newDirectory" + $testlink = "testlink" $FullyQualifiedFile = Join-Path -Path $tmpDirectory -ChildPath $testfile $FullyQualifiedFolder = Join-Path -Path $tmpDirectory -ChildPath $testfolder + $FullyQualifiedLink = Join-Path -Path $tmpDirectory -ChildPath $testlink BeforeEach { Clean-State @@ -92,4 +99,22 @@ Describe "New-Item" { Test-Path $FullyQualifiedFile | Should Be $false } + + It "Should create a symbolic link of a file without error" { + New-Item -Name $testfile -Path $tmpDirectory -ItemType file + Test-Path $FullyQualifiedFile | Should Be $true + + New-Item -ItemType SymbolicLink -Target $FullyQualifiedFile -Name $testlink -Path $tmpDirectory + Test-Path $FullyQualifiedLink | Should Be $true + } + + It "Should create a symbolic link from directory without error" { + New-Item -Name $testFolder -Path $tmpDirectory -ItemType directory + Test-Path $FullyQualifiedFolder | Should Be $true + + New-Item -ItemType SymbolicLink -Target $FullyQualifiedFolder -Name $testlink -Path $tmpDirectory + Test-Path $FullyQualifiedLink | Should Be $true + } + + } From d62247707385958817cdda42392325c519e3056c Mon Sep 17 00:00:00 2001 From: George Fleming Date: Mon, 29 Feb 2016 12:23:28 -0800 Subject: [PATCH 4/5] Change order of delete to get around broken symlink issue --- test/powershell/New-Item.Tests.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/powershell/New-Item.Tests.ps1 b/test/powershell/New-Item.Tests.ps1 index 60e6000192..7a57ff51d1 100644 --- a/test/powershell/New-Item.Tests.ps1 +++ b/test/powershell/New-Item.Tests.ps1 @@ -1,5 +1,10 @@ function Clean-State { + if (Test-Path $FullyQualifiedLink) + { + Remove-Item $FullyQualifiedLink -Force + } + if (Test-Path $FullyQualifiedFile) { Remove-Item $FullyQualifiedFile -Force @@ -9,11 +14,6 @@ { Remove-Item $FullyQualifiedFolder -Recurse -Force } - - if (Test-Path $FullyQualifiedLink) - { - Remove-Item $FullyQualifiedLink -Force - } } Describe "New-Item" { From 134ccef8c02874488acff85f4d19ddce58c937b0 Mon Sep 17 00:00:00 2001 From: George Fleming Date: Tue, 1 Mar 2016 10:12:11 -0800 Subject: [PATCH 5/5] Remove directory symlink first to avoid broken symlink issues --- test/powershell/New-Item.Tests.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/powershell/New-Item.Tests.ps1 b/test/powershell/New-Item.Tests.ps1 index 7a57ff51d1..ef4e42090b 100644 --- a/test/powershell/New-Item.Tests.ps1 +++ b/test/powershell/New-Item.Tests.ps1 @@ -12,7 +12,7 @@ if (Test-Path $FullyQualifiedFolder) { - Remove-Item $FullyQualifiedFolder -Recurse -Force + Remove-Item $FullyQualifiedFolder -Force } } @@ -114,6 +114,9 @@ Describe "New-Item" { New-Item -ItemType SymbolicLink -Target $FullyQualifiedFolder -Name $testlink -Path $tmpDirectory Test-Path $FullyQualifiedLink | Should Be $true + + # Remove the link explicitly to avoid broken symlink issue + Remove-Item $FullyQualifiedLink -Force }