From e9e06b8bae9b4f55ace0e8e6b6ae5e77de4c8e71 Mon Sep 17 00:00:00 2001 From: sterni Date: Tue, 20 Sep 2022 12:52:57 +0200 Subject: test(tvix/eval): add test cases for builtins.splitVersion Change-Id: I60648f6c5cea34d19afb5ced3e98051201190a78 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6711 Reviewed-by: grfn Tested-by: BuildkiteCI --- .../tests/tvix_tests/eval-okay-builtins-splitVersion.exp | 1 + .../tests/tvix_tests/eval-okay-builtins-splitVersion.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.nix diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.exp new file mode 100644 index 000000000000..222a0093f570 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.exp @@ -0,0 +1 @@ +[ [ "1" "2" "3" ] [ "2" "3" "16" ] [ "22" "11" "pre" "408963" "823" "e" "2" "c" "9" "b" "0" "a" "0" ] [ "9" "4" "1" "rc" "1" ] [ "9" "4" "0" "20220721" ] [ "0" "1" "alpha" ] [ "unstable" "2022" "09" "20" ] [ "30" "pre" "9" ] [ "0" "pre+date=" "2021" "11" "30" ] [ "1" "2" "0" "_pre" "23" ] [ "0" "1" "0" "pre" "71" "_" "170" "f" "840" ] ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.nix new file mode 100644 index 000000000000..4083e86714fc --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-splitVersion.nix @@ -0,0 +1,13 @@ +[ + (builtins.splitVersion "1.2.3") + (builtins.splitVersion "2.3.16") + (builtins.splitVersion "22.11pre408963.823e2c9b0a0") + (builtins.splitVersion "9.4.1-rc1") + (builtins.splitVersion "9.4.0.20220721") + (builtins.splitVersion "0.1-alpha") + (builtins.splitVersion "unstable-2022-09-20") + (builtins.splitVersion "30.pre9") + (builtins.splitVersion "0.pre+date=2021-11-30") + (builtins.splitVersion "1.2.0_pre23") + (builtins.splitVersion "0.1.0pre71_170f840") +] -- cgit 1.4.1