about summary refs log tree commit diff
path: root/tvix/eval/eval-okay-builtins-compareVersions.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/eval-okay-builtins-compareVersions.nix')
-rw-r--r--tvix/eval/eval-okay-builtins-compareVersions.nix12
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" "")
+]