From b9f03a2d1f4e2e11663fcf0ba7f4dd5a23219686 Mon Sep 17 00:00:00 2001 From: Jan Uhlig Date: Mon, 24 Jun 2024 14:55:11 +0200 Subject: [PATCH] Add format string tests --- lib/stdlib/test/io_SUITE.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl index 877e4eec75f7..4e5b97021dd1 100644 --- a/lib/stdlib/test/io_SUITE.erl +++ b/lib/stdlib/test/io_SUITE.erl @@ -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]] ],