about summary refs log tree commit diff
path: root/nixpkgs/lib/tests/misc.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
commit67419f0e56f99b0ebbe14574d3492110ac84c8d6 (patch)
tree3abc8e1606a2c80b6f5d14fef175e50800202163 /nixpkgs/lib/tests/misc.nix
parenta2c1eff83c3118a9aee8076c7f84f58137416b6e (diff)
parent9008bc4eb62c878d0812105ea1b34255d651df88 (diff)
downloadnixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.gz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.bz2
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.lz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.xz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.zst
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/lib/tests/misc.nix')
-rw-r--r--nixpkgs/lib/tests/misc.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixpkgs/lib/tests/misc.nix b/nixpkgs/lib/tests/misc.nix
index 47853f47278a..06cb5e763e2c 100644
--- a/nixpkgs/lib/tests/misc.nix
+++ b/nixpkgs/lib/tests/misc.nix
@@ -191,6 +191,11 @@ runTests {
     expected = "a\nb\nc\n";
   };
 
+  testReplicateString = {
+    expr = strings.replicate 5 "hello";
+    expected = "hellohellohellohellohello";
+  };
+
   testSplitStringsSimple = {
     expr = strings.splitString "." "a.b.c.d";
     expected = [ "a" "b" "c" "d" ];
@@ -721,6 +726,15 @@ runTests {
     expected = 7;
   };
 
+  testAllUnique_true = {
+    expr = allUnique [ 3 2 4 1 ];
+    expected = true;
+  };
+  testAllUnique_false = {
+    expr = allUnique [ 3 2 3 4 ];
+    expected = false;
+  };
+
 # ATTRSETS
 
   testConcatMapAttrs = {