This is an automated email from the ASF dual-hosted git repository. nickva pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git
commit 953a171134e25ae63195caaae51e192e5d12f8aa Author: Nick Vatamaniuc <[email protected]> AuthorDate: Tue Mar 31 01:00:13 2026 -0400 Add a deep pretty printing test Coverage showed we didnt' test the `NUM_SHIFT>8` case in `enc_shift` (Yay for coverage!) --- test/jiffy_05_array_tests.erl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/jiffy_05_array_tests.erl b/test/jiffy_05_array_tests.erl index 26e0a65..1f6b750 100644 --- a/test/jiffy_05_array_tests.erl +++ b/test/jiffy_05_array_tests.erl @@ -26,6 +26,14 @@ nested(0) -> <<"bottom">>; nested(N) -> [nested(N - 1)]. +encode_deep_pretty_test() -> + %% Here we're trying to go deeper than NUM_SHIFTS=8 in enc_shift + Deep = lists:foldl(fun(_, Acc) -> [Acc] end, 1, lists:seq(1, 12)), + Encoded = iolist_to_binary(jiffy:encode(Deep, [pretty])), + ?assert(is_binary(Encoded)), + ?assertEqual(Deep, jiffy:decode(Encoded)). + + gen(ok, {J, E}) -> gen(ok, {J, E, J}); gen(ok, {J1, E, J2}) ->
