diff options
author | sterni <sternenseemann@systemli.org> | 2022-09-19T11·28+0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-09-21T14·23+0000 |
commit | 367a6a13d4c629265ef8f9f9a0d6be4f37bb7f2a (patch) | |
tree | 20c3877cbb889350e104816ed99eee290e03a56c /tvix/eval | |
parent | 083fc1dbe59e28bb25cc1dc7405ee45d9d9244b7 (diff) |
test(tvix/eval): add more compareVersions cases from C++ Nix r/4951
Change-Id: I25e7e7a2c547d0874e1e949bf96e6e066b1075ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/6705 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.exp | 2 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.nix | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.exp index d9599941033a..0ec1768e2cba 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.exp +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.exp @@ -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 ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.nix index 4c3ed5987509..dd3c8a0ac123 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-compareVersions.nix @@ -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") ] |