mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Fixes to tests to be run x-plaform
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
$path = "$env:temp\test.xlsx"
|
||||
|
||||
if (-not $env:TEMP) {$env:TEMP = [IO.Path]::GetTempPath() -replace "/$","" }
|
||||
$notWindows = ($PSVersionTable.os -and $PSVersionTable.os -notMatch 'Windows' )
|
||||
|
||||
$path = Join-Path $Env:TEMP "test.xlsx"
|
||||
describe "Consistent passing of ranges." {
|
||||
if ($notWindows) {Write-warning -message "Test uses get-service so only works on Windows" ; return}
|
||||
Context "Conditional Formatting" {
|
||||
Remove-Item -path $path -ErrorAction SilentlyContinue
|
||||
$excel = Get-Service | Export-Excel -Path $path -WorksheetName Services -PassThru -AutoSize -DisplayPropertySet -AutoNameRange -Title "Services on $Env:COMPUTERNAME"
|
||||
|
||||
Reference in New Issue
Block a user