Skip to content

Commit 71aab20

Browse files
committed
Invalid formats do not spill internal details
RT#129088
1 parent 73f7539 commit 71aab20

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S32-str/sprintf.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 159;
5+
plan 160;
66

77
# L<S32::Str/Str/"identical to" "C library sprintf">
88

@@ -278,4 +278,11 @@ is Date.new(-13_000_000_000, 1, 1), '-13000000000-01-01
278278
'sprintf complains about unsupported directives';
279279
}
280280

281+
# RT #129088
282+
{
283+
throws-like { sprintf 'D6.2', 'foo' }, X::Str::Sprintf::Directives::Count,
284+
backtrace => /^ [ <!after 'panic'> . ]+ $/,
285+
'Invalid formats do not spill internal details';
286+
}
287+
281288
# vim: ft=perl6

0 commit comments

Comments
 (0)