From 0879d4796fd94e5ef1e0bb938b0071fbdc9274fe Mon Sep 17 00:00:00 2001 From: Michael Kelley Date: Sat, 29 Feb 2020 16:35:56 -0800 Subject: [PATCH] Fix .dll missing types - PSFzf.dll is no longer missing ReverseLineReader - add back unit test to make sure type loads --- .github/scripts/Build.ps1 | 9 ++++++++- PSFzf.tests.ps1 | 13 +++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/scripts/Build.ps1 b/.github/scripts/Build.ps1 index c3fcd42..3ff3d6a 100644 --- a/.github/scripts/Build.ps1 +++ b/.github/scripts/Build.ps1 @@ -1,2 +1,9 @@ +$ErrorActionPreference = "Stop" + $env:DOTNET_CLI_TELEMETRY_OPTOUT=1 -dotnet build --configuration Release --output . .\PSFzf-Binary\PSFzf-Binary.csproj \ No newline at end of file +dotnet build --configuration Release PSFzf.sln +$dllPaths = Get-ChildItem PSFzf.dll -Recurse +if ($null -eq $dllPaths) { + throw 'Unable to find PSFzf.dll' +} +Copy-Item $dllPaths[0].FullName . -Force -Verbose \ No newline at end of file diff --git a/PSFzf.tests.ps1 b/PSFzf.tests.ps1 index 8e65986..b3751d2 100644 --- a/PSFzf.tests.ps1 +++ b/PSFzf.tests.ps1 @@ -111,6 +111,19 @@ Describe "Find-CurrentPath" { } } +Describe "Add-BinaryModuleTypes" { + InModuleScope PsFzf { + Context "Module Loaded" { + It "Be Able to Create Type" { + $filePath = Join-Path ([system.io.path]::GetTempPath()) 'TestFile.txt' + 1..100 | Add-Content $filePath + $newObject = New-Object PSFzf.IO.ReverseLineReader -ArgumentList $filePath + $newObject | Should Not Be $null + } + } + } +} + # CI seems to have problems on GitHub CI - timing issues? if ( $false ) {