diff options
author | ThoFrank <thomas@franks-im-web.de> | 2022-09-17T07·23+0200 |
---|---|---|
committer | Thomas Frank <thomas@franks-im-web.de> | 2022-09-17T14·48+0000 |
commit | ef80d00b06f3d90e37a94d65ce8c56062b19a43a (patch) | |
tree | 9fcf1c54a5b6d3b50248fea5383e0a01f5a97ad1 /tvix/eval/eval-okay-builtins-compareVersions.nix | |
parent | 1ee0f670b96de50c23f8b160993853af35e18038 (diff) |
feat(tvix_eval): Support builtins.compareVersions r/4885
Added an Iterator over &str wich yields the VersionParts. Change-Id: I8043d423127446a173d01d290aab10de0c24a6fc Reviewed-on: https://cl.tvl.fyi/c/depot/+/6619 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/eval-okay-builtins-compareVersions.nix')
-rw-r--r-- | tvix/eval/eval-okay-builtins-compareVersions.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tvix/eval/eval-okay-builtins-compareVersions.nix b/tvix/eval/eval-okay-builtins-compareVersions.nix new file mode 100644 index 000000000000..769de79ad583 --- /dev/null +++ b/tvix/eval/eval-okay-builtins-compareVersions.nix @@ -0,0 +1,12 @@ +[ + (builtins.compareVersions "1.2.3" "1.2.3") + (builtins.compareVersions "1.2.2" "1.2.3") + (builtins.compareVersions "1.2.3" "1.2.40") + (builtins.compareVersions "1.2.3" ".1.2.3") + (builtins.compareVersions "1.2.3" "1..2.3") + (builtins.compareVersions "1.2.3" "1.2.3.") + (builtins.compareVersions "1.2.3" "1.2") + (builtins.compareVersions "1.2.3" "1.2.a") + (builtins.compareVersions "1a.b" "1a.2") + (builtins.compareVersions "1" "") +] |