From ccab9c06a2f01353b8a91469d46a498a75961431 Mon Sep 17 00:00:00 2001 From: James Landrein Date: Tue, 25 Oct 2022 13:56:14 +0200 Subject: feat(tvix/eval): add builtins.replaceStrings Change-Id: I93dcdaeb101364ee2273bcaeb19acb57cf6b9e7d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7034 Autosubmit: j4m3s Reviewed-by: Adam Joseph Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.nix | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.nix (limited to 'tvix/eval/src/tests/tvix_tests') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.exp new file mode 100644 index 000000000000..c2cb89bac663 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.exp @@ -0,0 +1 @@ +[ "fabir" "a" "1a1" ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.nix new file mode 100644 index 000000000000..b8101c448bb0 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-replaceStrings.nix @@ -0,0 +1,5 @@ +[ + (builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar") + (builtins.replaceStrings ["o"] ["a"] "a") + (builtins.replaceStrings ["" ""] ["1" "2"] "a") +] -- cgit 1.4.1