Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fudge two tests (todo) since error message would change with NQP PR 219
  • Loading branch information
usev6 committed Jan 25, 2015
1 parent 7eb85d9 commit f16e55e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions S32-str/sprintf.t
Expand Up @@ -251,16 +251,18 @@ is Date.new(-13_000_000_000, 1, 1), '-13000000000-01-01

# RT #106594, #62316, #74610
#?niecza skip 'dubious test - should be testing exception type, not string. Niecza does respond with an appropriate, but differently worded string'
#?rakudo todo 'NQP PR 219'
{
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
#?rakudo todo 'NQP PR 219'
{
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

1 comment on commit f16e55e

@usev6
Copy link
Contributor Author

@usev6 usev6 commented on f16e55e Jan 25, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted if said PR (Raku/nqp#219) is not included. I fudged the tests so there won't be spectest failures when the PR is included.

Please sign in to comment.