Skip to content

Commit

Permalink
lib/tests/misc: Add tests for charToInt, escapeC, and normalizePath
Browse files Browse the repository at this point in the history
  • Loading branch information
dali99 committed Oct 20, 2022
1 parent 3251123 commit 23c1754
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/tests/misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 23c1754

Please sign in to comment.