Skip to content

Commit

Permalink
Add format string tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juhlig committed Jun 24, 2024
1 parent 21266ac commit b9f03a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/stdlib/test/io_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3135,7 +3135,14 @@ error_info(Config) ->
{Format,["~s",["Спутник-1"]],[{1,"failed to format string"}]},
{Format,["~s",[1]],[{2,"1 must be of type string"}]},
{Format,["~s~s",[a,1]],[{2,"2 must be of type string"}]},
{Format,["~s",[[a]]],[{2,"1 must be of type string"}]}] || Format <- [format,fwrite]]
{Format,["~s",[[a]]],[{2,"1 must be of type string"}]},

%% Ensure error messages contain the correct reason (GH-8568)
{Format, ["~ltkKltkKp", []], [{1,"wrong number of arguments"}]},
{Format, ["~ltkKltkKm", [undefined, ordered, a]], [{1,"format string"}]},
{Format, ["~ltkKltkKb", [undefined, ordered, a]], [{2,"3 must be of type integer"}]}
]
|| Format <- [format,fwrite]]

],

Expand Down

0 comments on commit b9f03a2

Please sign in to comment.