test(tvix/eval): add more compareVersions test cases involving pre
This asserts the not-quite lexicographical property of the comparison. Change-Id: Iad68081e4b3a7106513f479643de87065dc47739 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6721 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
367a6a13d4
commit
7ea249969a
2 changed files with 7 additions and 1 deletions
|
@ -1 +1 @@
|
|||
[ 0 -1 -1 0 0 0 1 1 -1 1 -1 -1 -1 0 1 1 1 1 -1 -1 -1 -1 -1 ]
|
||||
[ 0 -1 -1 0 0 0 1 1 -1 1 -1 1 -1 -1 -1 -1 0 -1 -1 0 1 1 1 1 -1 -1 -1 -1 -1 ]
|
||||
|
|
|
@ -19,6 +19,12 @@ in
|
|||
(cmp "1a.b" "1a.2")
|
||||
(cmp "1" "")
|
||||
(cmp "1.0" "1.0.0")
|
||||
(cmp "2.3" "2.3pre")
|
||||
(cmp "2.3" "2.3.0pre")
|
||||
(cmp "2.3pre" "2.3.0pre")
|
||||
(cmp "2.3" "2.3prepre")
|
||||
(cmp "2.3pre" "2.3prepre")
|
||||
(cmp "2.3prepre" "2.3prepre")
|
||||
# Subset of test cases from eval-okay-versions.nix shipped by C++ Nix
|
||||
(cmp "1.0" "2.3")
|
||||
(cmp "2.1" "2.3")
|
||||
|
|
Loading…
Reference in a new issue