about summary refs log tree commit diff
path: root/users/sterni/nix/string/tests
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni/nix/string/tests')
-rw-r--r--users/sterni/nix/string/tests/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/users/sterni/nix/string/tests/default.nix b/users/sterni/nix/string/tests/default.nix
index 2caecbfa7b3f..c8aec9464077 100644
--- a/users/sterni/nix/string/tests/default.nix
+++ b/users/sterni/nix/string/tests/default.nix
@@ -56,10 +56,17 @@ let
       }))
   ];
 
+  f = "f";
+  testPrintf = it "prints f" [
+    (assertEq "basic %s usage" "print ${f}" (string.printf "print %s" f))
+    (assertEq "% escaping" "100%" (string.printf "100%%"))
+  ];
+
 in
   runTestsuite "nix.string" [
     testTakeDrop
     testIndexing
     testFinding
     testMatch
+    testPrintf
   ]