summaryrefslogtreecommitdiffstats
path: root/lib/tests/misc.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r--lib/tests/misc.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index 3a6db53c276d..6175f15819a7 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -154,6 +154,20 @@ runTests {
expected = [ "2001" "db8" "0" "0042" "" "8a2e" "370" "" ];
};
+ testSplitStringsRegex = {
+ expr = strings.splitString "\\[{}]()^$?*+|." "A\\[{}]()^$?*+|.B";
+ expected = [ "A" "B" ];
+ };
+
+ testSplitStringsDerivation = {
+ expr = take 3 (strings.splitString "/" (derivation {
+ name = "name";
+ builder = "builder";
+ system = "system";
+ }));
+ expected = ["" "nix" "store"];
+ };
+
testSplitVersionSingle = {
expr = versions.splitVersion "1";
expected = [ "1" ];