Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for nqp::ordat.
  • Loading branch information
pmurias committed Feb 7, 2015
1 parent 7e6ee3c commit c30f376
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion t/nqp/59-nqpop.t
Expand Up @@ -2,7 +2,7 @@

# Test nqp::op pseudo-functions.

plan(121);
plan(122);


ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
Expand All @@ -26,6 +26,7 @@ ok( nqp::index('rakudo', 'dont') == -1, 'nqp::index not found');
ok( nqp::chr(120) eq 'x', 'nqp::chr');
ok( nqp::ord('xyz') eq 120, 'nqp::ord');
ok( nqp::ord('xyz',2) eq 122, '2 argument nqp::ord');
ok( nqp::ordat('xyz',2) eq 122, 'nqp::ordat');
ok( nqp::lc('Hello World') eq 'hello world', 'nqp::downcase');
ok( nqp::uc("Don't Panic") eq "DON'T PANIC", 'nqp::upcase');
ok( nqp::flip("foo") eq "oof", "nqp::flip");
Expand Down Expand Up @@ -180,3 +181,9 @@ ok(nqp::eqat("foobar","foobarbaz", 0) == 0, "eqat with needle argument longer th
nqp::splice($b, $source, 1, 2);
ok(nqp::join(",", $b) eq '1,100,200,300,4', "splice");
}

{
my $list := nqp::list("1","2","3","4","5");
nqp::setelems($list, 3);
ok(nqp::join(",", $list) eq '1,2,3')
}

0 comments on commit c30f376

Please sign in to comment.