mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
The orignal test took too long to run
This commit is contained in:
@@ -34,17 +34,9 @@ Describe 'Test' -Tag ImportExcelEndRowAndCols {
|
||||
}
|
||||
|
||||
It 'Should read any row up to maximum allowed row' {
|
||||
# Max Rows sheet has row number as integer in column 1.
|
||||
$xlMaxRows = "$PSScriptRoot\MaxRows.xlsx"
|
||||
# Construct array of ten numbers. Min (1), 8 random numbers between Min and max, Max (1048576)
|
||||
$countOfTen = @(1)
|
||||
$countOfTen += (Get-Random -Count 8 -InputObject (2..1048575)) | Sort-Object
|
||||
$countOfTen += 1048576
|
||||
# Test these cell values.
|
||||
$countOfTen | ForEach-Object {
|
||||
$actual = Import-Excel $xlMaxRows -StartRow $_ -EndRow $_ -NoHeader
|
||||
$actual.P1 | Should -Be $_
|
||||
}
|
||||
$actual = Import-Excel $xlMaxRows -StartRow 1048576 -EndRow 1048576 -NoHeader
|
||||
$actual.P1 | Should -Be 1048576
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user