Files
Scoop/test/Scoop-Versions.Tests.ps1
T
Simon Hartcher 3a2adf9c3d Migrate old tests to Pester
Migrate unzip_old tests to pester
Migrate packages tests to Pester
Migrate opts.ps1 to Pester
Migrate tests to use Pester idiomatic tests
Move tests.ps1 to Scoop-TestLib.ps1
2015-04-12 12:11:03 +10:00

21 lines
458 B
PowerShell

. "$psscriptroot\Scoop-TestLib.ps1"
. "$psscriptroot\..\lib\versions.ps1"
describe "versions" {
it 'compares versions with integer-string mismatch' {
$a = '1.8.9'
$b = '1.8.5-1'
$res = compare_versions $a $b
$res | should be 1
}
it 'handles plain string version comparison to int version' {
$a = 'latest'
$b = '20150405'
$res = compare_versions $a $b
$res | should be 1
}
}