Incorrectly assigned values to a variable - some options for exported documents can be ignored
it-praktyk opened this issue · 1 comments
it-praktyk commented
Due to bug - introduced in the version 1.4.0 - some options defined for exported documents can be ignored.
Except key values pars for options, a separate hashtable was assigned to $exportParams.
PS >git blame -L 208,227 .\Format-Pester\Public\Format-Pester.ps1
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 208) $exportParams = @{ }
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 209) if ($Format.Count -eq 1 -and $Format -eq 'HTML') {
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 210)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 211) $exportParams += @{
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 212)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 213) Options = @{ NoPageLayoutStyle = $true }
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 214) }
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 215)
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 216)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 217) }
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 218) elseif ($Format -contains 'text' -and $TextFileEncoding -ne 'ASCII') {
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 219)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 220) $exportParams += @{
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 221)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 222) Options = @{ Encoding = $TextFileEncoding }
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 223)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 224) }
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 225)
eac5953c (Wojciech Sciesinski 2017-05-10 06:22:25 +0100 226)
3efd9e45 (Wojciech Sciesinski 2016-09-05 22:26:56 +0200 227) }
PS >git show 3efd9e45
commit 3efd9e45525f690102cca0bd95bfd6e631ac0a89
Author: Wojciech Sciesinski <wojciech@sciesinski.net>
Date: Mon Sep 5 22:26:56 2016 +0200
The issue fixed #12, possibility to dump the PScribo object added - resolved #15, the test for translations corrected, documentation updated
it-praktyk commented
Fixed by #33