anchor.diff:      ?assertEqual("hello\nworld", lists:flatten(format("~s", [<<"hello\nworld">>], 50))),
       ?assertEqual("<<\"hello\\nworld\">>", lists:flatten(format("~p", [<<"hello\nworld">>], 50))),
       ?assertEqual("     hello", lists:flatten(format("~10s", [<<"hello">>], 50))),
  +    ok.
  +
  +bitstring_printing_test() ->
  +    ?assertEqual("<<1,2,3,1:7>>", lists:flatten(format("~p",
  +                [<<1, 2, 3, 1:7>>], 100))),
  +    ?assertEqual("<<1:7>>", lists:flatten(format("~p",
  +                [<<1:7>>], 100))),
  +    ?assertEqual("<<1,2,3,...>>", lists:flatten(format("~p",
  +                [<<1, 2, 3, 1:7>>], 12))),
  +    ?assertEqual("<<1,2,3,...>>", lists:flatten(format("~p",
  +                [<<1, 2, 3, 1:7>>], 13))),
  +    ?assertEqual("<<1,2,3,1:7>>", lists:flatten(format("~p",
  +                [<<1, 2, 3, 1:7>>], 14))),
  +    ?assertEqual("<<..>>", lists:flatten(format("~p", [<<1:7>>], 0))),
  +    ?assertEqual("<<...>>", lists:flatten(format("~p", [<<1:7>>], 1))),
       ok.
   
   list_printing_test() ->
  
positive.code: list_body([], _Max, _Options, _Tuple) -> {[], 0};
  list_body(_, Max, _Options, _Tuple) when Max < 4 -> {"...", 3};
  list_body(_, _Max, #print_options{depth=0}, _Tuple) -> {"...", 3};
  list_body([H|T], Max, Options, Tuple) -> 
      {List, Len} = print(H, Max, Options),
      {Final, FLen} = list_bodyc(T, Max - Len, Options, Tuple),
  
negative.code: print(<<>>, _Max, _Options) ->
      {"<<>>", 4};
  
  print(Binary, 0, _Options) when is_bitstring(Binary) ->
      {"<<..>>", 6};
  
  print(Binary, Max, Options) when is_binary(Binary) ->
      B = binary_to_list(Binary, 1, lists:min([Max, byte_size(Binary)])),
      {L, Len} = case Options#print_options.lists_as_strings orelse
          Options#print_options.force_strings of
          true ->
  