Loading lib/tests/misc.nix +27 −2 Original line number Diff line number Diff line Loading @@ -386,8 +386,9 @@ runTests { expected = 255; }; testFromHexStringSecondExample = { expr = fromHexString (builtins.hashString "sha256" "test"); # Highest supported integer value in Nix. testFromHexStringMaximum = { expr = fromHexString "7fffffffffffffff"; expected = 9223372036854775807; }; Loading @@ -396,6 +397,30 @@ runTests { expected = 15; }; # FIXME: This might be bad and should potentially be deprecated. testFromHexStringQuestionableMixedCase = { expr = fromHexString "eEeEe"; expected = 978670; }; # FIXME: This is probably bad and should potentially be deprecated. testFromHexStringQuestionableUnderscore = { expr = fromHexString "F_f"; expected = 255; }; # FIXME: This is definitely bad and should be deprecated. testFromHexStringBadComment = { expr = fromHexString "0 # oops"; expected = 0; }; # FIXME: Oh my god. testFromHexStringAwfulInjection = { expr = fromHexString "1\nwhoops = {}"; expected = 1; }; testToBaseDigits = { expr = toBaseDigits 2 6; expected = [ Loading lib/trivial.nix +1 −1 Original line number Diff line number Diff line Loading @@ -1114,7 +1114,7 @@ in fromHexString "FF" => 255 fromHexString (builtins.hashString "sha256" "test") fromHexString "0x7fffffffffffffff" => 9223372036854775807 ``` */ Loading Loading
lib/tests/misc.nix +27 −2 Original line number Diff line number Diff line Loading @@ -386,8 +386,9 @@ runTests { expected = 255; }; testFromHexStringSecondExample = { expr = fromHexString (builtins.hashString "sha256" "test"); # Highest supported integer value in Nix. testFromHexStringMaximum = { expr = fromHexString "7fffffffffffffff"; expected = 9223372036854775807; }; Loading @@ -396,6 +397,30 @@ runTests { expected = 15; }; # FIXME: This might be bad and should potentially be deprecated. testFromHexStringQuestionableMixedCase = { expr = fromHexString "eEeEe"; expected = 978670; }; # FIXME: This is probably bad and should potentially be deprecated. testFromHexStringQuestionableUnderscore = { expr = fromHexString "F_f"; expected = 255; }; # FIXME: This is definitely bad and should be deprecated. testFromHexStringBadComment = { expr = fromHexString "0 # oops"; expected = 0; }; # FIXME: Oh my god. testFromHexStringAwfulInjection = { expr = fromHexString "1\nwhoops = {}"; expected = 1; }; testToBaseDigits = { expr = toBaseDigits 2 6; expected = [ Loading
lib/trivial.nix +1 −1 Original line number Diff line number Diff line Loading @@ -1114,7 +1114,7 @@ in fromHexString "FF" => 255 fromHexString (builtins.hashString "sha256" "test") fromHexString "0x7fffffffffffffff" => 9223372036854775807 ``` */ Loading