anchor.diff:      ok.
   
   list_printing_test() ->
  +    ?assertEqual("[]", lists:flatten(format("~p", [[]], 50))),
  +    ?assertEqual("[]", lists:flatten(format("~w", [[]], 50))),
  +    ?assertEqual("", lists:flatten(format("~s", [[]], 50))),
  +    ?assertEqual("...", lists:flatten(format("~s", [[]], -1))),
  +    ?assertEqual("[[]]", lists:flatten(format("~p", [[[]]], 50))),
       ?assertEqual("[13,11,10,8,5,4]", lists:flatten(format("~p", [[13,11,10,8,5,4]], 50))),
  +    ?assertEqual("\"\rabc\"", lists:flatten(format("~p", [[13,$a, $b, $c]], 50))),
       ?assertEqual("[1,2,3|4]", lists:flatten(format("~p", [[1, 2, 3|4]], 50))),
  +    ?assertEqual("[...]", lists:flatten(format("~p", [[1, 2, 3,4]], 4))),
  +    ?assertEqual("[1,...]", lists:flatten(format("~p", [[1, 2, 3,4]], 6))),
       ?assertEqual("[1|4]", lists:flatten(format("~p", [[1|4]], 50))),
  +    ?assertEqual("[1]", lists:flatten(format("~p", [[1]], 50))),
       ?assertError(badarg, lists:flatten(format("~s", [[1|4]], 50))),
       ?assertEqual("\"hello...\"", lists:flatten(format("~p", ["hello world"], 10))),
       ?assertEqual("hello w...", lists:flatten(format("~s", ["hello world"], 10))),
       ?assertEqual("hello world\r\n", lists:flatten(format("~s", ["hello world\r\n"], 50))),
       ?assertEqual("\rhello world\r\n", lists:flatten(format("~s", ["\rhello world\r\n"], 50))),
       ?assertEqual("...", lists:flatten(format("~s", ["\rhello world\r\n"], 3))),
  -    ?assertEqual("[]", lists:flatten(format("~s", [[]], 50))),
  +    ok.
  +
  +tuple_printing_test() ->
  +    ?assertEqual("{}", lists:flatten(format("~p", [{}], 50))),
  +    ?assertEqual("{}", lists:flatten(format("~w", [{}], 50))),
  +    ?assertError(badarg, lists:flatten(format("~s", [{}], 50))),
  +    ?assertEqual("{...}", lists:flatten(format("~p", [{foo}], 3))),
  +    ?assertEqual("{foo,...}", lists:flatten(format("~p", [{foo,bar}], 6))),
  +    ?assertEqual("{foo,bar}", lists:flatten(format("~p", [{foo,bar}], 9))),
       ok.
   
   unicode_test() ->
  
positive.code: print(Term, Max, Options) when is_list(Options) ->
      %% need to convert the proplist to a record
      print(Term, Max, prepare_options(Options, #print_options{}));
  print(_, Max, _Options) when Max < 0 -> {"...", 3};
  print(_, _, #print_options{depth=0}) -> {"...", 3};
  print(Tuple, Max, Options) when is_tuple(Tuple) -> 
      {TC, Len} = tuple_contents(Tuple, Max-2, Options),
      {[${, TC, $}], Len + 2};
  
negative.code: %% [0,65,66] -> [0,65,66]
  %% [65,b,66] -> "A"[b,66]
  %%
  alist_start([], _Max, #print_options{force_strings=true}) -> {"", 0};
  alist_start([], _Max, _Options) -> {"[]", 2};
  alist_start(_, Max, _Options) when Max < 4 -> {"...", 3};
  alist_start(_, _Max, #print_options{depth=0}) -> {"[...]", 3};
  