Skip to content

Commit

Permalink
Add tests for %h{|| foo} and @A[|| bar] cases
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Nov 1, 2020
1 parent 2b6c8e6 commit 12096fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion S32-array/multislice-6e.t
@@ -1,7 +1,7 @@
use v6.e.PREVIEW;
use Test;

plan 796;
plan 797;

# Testing array multislices, aka @a[0;1;2] and associated adverbs

Expand Down Expand Up @@ -473,6 +473,8 @@ for
'|| did assignment to non-existing indices return the assigned values';
is-deeply @array, [[Any,333],[Any,444]],
'|| did the array get changed correctly';
is-deeply @array[|| 1], [Any,444],
'|| could we specify a single index';
}

# vim: expandtab shiftwidth=4
4 changes: 3 additions & 1 deletion S32-hash/multislice-6e.t
@@ -1,7 +1,7 @@
use v6.e.PREVIEW;
use Test;

plan 543;
plan 544;

# Testing hash multislices, aka %h{a;b;c} and associated adverbs

Expand Down Expand Up @@ -404,6 +404,8 @@ for
'|| did assignment to non-existing keys return the assigned values';
is-deeply %hash, { a => { d => 333 }, b => { d => 444 } },
'|| did the hash get changed correctly';
is-deeply %hash{|| "b"}, { d => 444 },
'|| did single key get handled correctly';
}

# vim: expandtab shiftwidth=4

0 comments on commit 12096fd

Please sign in to comment.