Test for updated doc. on latest / ranges / -rc (#349)

* Set the expectations

* Reason on the past

* Also allow for removal of OTP- in comparison to RC

* Test it on what makes sense

* For known elements don't compare with ranges

* Don't put maint-27 alongside 27 in the initial map

* Generate the dist

* Revisit the whole latest vs. rc- vs. strict definition
This commit is contained in:
Paulo F. Oliveira
2025-06-26 20:39:15 +01:00
committed by GitHub
parent 75edbb8287
commit 6a38171948
4 changed files with 65 additions and 17 deletions
+20
View File
@@ -875,11 +875,31 @@ describe('.getVersionFromSpec(_)', () => {
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-20.04'])
assert.deepStrictEqual(got, expected)
spec = 'maint-24'
expected = 'maint-24'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04'])
assert.deepStrictEqual(got, expected)
spec = '> 0'
expected = 'OTP-26.2.5'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04'])
assert.deepStrictEqual(got, expected)
spec = 'latest'
expected = 'OTP-27.0-rc3'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04'])
assert.deepStrictEqual(got, expected)
spec = 'maint-26'
expected = 'maint-26'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04'])
assert.deepStrictEqual(got, expected)
spec = '> 0'
expected = 'OTP-27.0'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04'])
assert.deepStrictEqual(got, expected)
spec = 'latest'
expected = 'OTP-27.0'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04'])