anchor.diff:      ?assertEqual("hello", lists:flatten(format("~s", ["hello"], 50))),
       ?assertEqual("hello", lists:flatten(format("~s", [hello], 50))),
       ?assertEqual("hello", lists:flatten(format("~p", [hello], 50))),
  +    ?assertEqual("'hello world'", lists:flatten(format("~p", ['hello world'], 50))),
  +    ?assertEqual("hello world", lists:flatten(format("~s", ['hello world'], 50))),
  +    ok.
  +
  +binary_printing_test() ->
  +    ?assertEqual("<<\"hello\">>", lists:flatten(format("~p", [<<$h, $e, $l, $l, $o>>], 50))),
  +    ?assertEqual("<<\"hello\">>", lists:flatten(format("~p", [<<"hello">>], 50))),
  +    ?assertEqual("<<1,2,3,4>>", lists:flatten(format("~p", [<<1, 2, 3, 4>>], 50))),
  +    ?assertEqual("<<1,2,3,4>>", lists:flatten(format("~s", [<<1, 2, 3, 4>>], 50))),
  +    ?assertEqual("hello", lists:flatten(format("~s", [<<"hello">>], 50))),
  +    ?assertEqual("hello", lists:flatten(format("~10s", [<<"hello">>], 50))),
       ok.
   -endif.
  
positive.code:                     {Value, RealLen} = case H of
                          "s" ->
                              % strip off the doublequotes, if applicable
                              Trimmed = case {hd(String), lists:last(String)} == {$", $"} of
                                  true ->
                                      string:strip(String, both, $");
                                  _ ->
                                      String
                              end,
                              {Trimmed, length(Trimmed)};
                          _ ->
                              {String, Length}
  
negative.code: atom_needs_quoting(_) ->
      true.
  
  unquote_string([$<, $<, $"|T] = Str) ->
      case string:substr(T, length(T) - 2) of
          "\">>" ->
              string:substr(T, 1, length(T) - 3);
          _ ->
              Str
      end;
  unquote_string([$"|_] = Str) ->
      case lists:last(Str) == $" of
          true ->
              string:strip(Str, both, $");
          _ ->
              Str
      end;
  unquote_string([$'|_] = Str) ->
      case lists:last(Str) == $' of
          true ->
              string:strip(Str, both, $');
          _ ->
              Str
      end;
  unquote_string(S) ->
      S.
  
  -ifdef(TEST).
  %%--------------------
  %% The start of a test suite. So far, it only checks for not crashing.
  