diff options
author | Daniel Olsen <daniel.olsen99@gmail.com> | 2022-06-23 22:46:23 +0200 |
---|---|---|
committer | Daniel Olsen <daniel.olsen99@gmail.com> | 2022-10-20 20:12:15 +0200 |
commit | 23c1754fff74ee55ca2fa7188130805a7793c9c0 (patch) | |
tree | 52218f117eaaef078c3110c830a240572fd638ca /lib | |
parent | 3251123a779636d6883032f158ff99ebe98c0da4 (diff) |
lib/tests/misc: Add tests for charToInt, escapeC, and normalizePath
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tests/misc.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 74020bc7c8e5d..8e0cf1f45bb60 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -312,6 +312,21 @@ runTests { expected = true; }; + testNormalizePath = { + expr = strings.normalizePath "//a/b//c////d/"; + expected = "/a/b/c/d/"; + }; + + testCharToInt = { + expr = strings.charToInt "A"; + expected = 65; + }; + + testEscapeC = { + expr = strings.escapeC [ " " ] "Hello World"; + expected = "Hello\\x20World"; + }; + # LISTS testFilter = { |