Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix tests for changed error message
  • Loading branch information
usev6 committed Jan 26, 2015
1 parent beea0a8 commit 034ad32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S32-str/sprintf.t
Expand Up @@ -253,14 +253,14 @@ is Date.new(-13_000_000_000, 1, 1), '-13000000000-01-01
#?niecza skip 'dubious test - should be testing exception type, not string. Niecza does respond with an appropriate, but differently worded string'
{
try sprintf("%d-%s", 42);
is $!, 'Too many directives: found 2, but only 1 arguments after the format string', 'RT #106594, #62316, #74610';
is $!, 'Directives specify 2 arguments, but 1 argument was supplied', 'RT #106594, #62316, #74610';
}

# RT #122907
# TODO: write a better test once there is a typed exception
{
throws_like { sprintf "%d" }, Exception,
message => 'Too many directives: found 1, but no arguments after the format string',
message => 'Directives specify 1 argument, but no argument was supplied',
"adequate error when sprintf %d directive doesn't find a corresponding argument";
}

Expand Down

0 comments on commit 034ad32

Please sign in to comment.