test(tvix/eval): add more compareVersions cases from C++ Nix

Change-Id: I25e7e7a2c547d0874e1e949bf96e6e066b1075ed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6705
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
sterni 2022-09-19 13:28:01 +02:00
parent 083fc1dbe5
commit 367a6a13d4
2 changed files with 15 additions and 1 deletions

View file

@ -1 +1 @@
[ 0 -1 -1 0 0 0 1 1 -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 ]

View file

@ -18,4 +18,18 @@ in
(cmp "1.2.3" "1.2.a")
(cmp "1a.b" "1a.2")
(cmp "1" "")
(cmp "1.0" "1.0.0")
# Subset of test cases from eval-okay-versions.nix shipped by C++ Nix
(cmp "1.0" "2.3")
(cmp "2.1" "2.3")
(cmp "2.3" "2.3")
(cmp "2.5" "2.3")
(cmp "3.1" "2.3")
(cmp "2.3.1" "2.3")
(cmp "2.3.1" "2.3a")
(cmp "2.3pre1" "2.3")
(cmp "2.3pre3" "2.3pre12")
(cmp "2.3a" "2.3c")
(cmp "2.3pre1" "2.3c")
(cmp "2.3pre1" "2.3q")
]