Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

testing index() with junction

git-svn-id: http://svn.pugscode.org/pugs@25991 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit d4cdad3f5d048498aa274b1df4a141405a2be652 1 parent 05e332f
szabgab authored
Showing with 21 additions and 2 deletions.
  1. +21 −2 S03-junctions/misc.t
View
23 S03-junctions/misc.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 82;
+plan 88;
=begin pod
@@ -323,7 +323,7 @@ ok(!(?(1&0) != ?(1&&0)), 'boolean context');
# used to be a rakudo regression (RT #60886)
ok ?(undef & undef ~~ undef), 'undef & undef ~~ undef works';
-
+## See also S03-junctions/autothreading.t
#?rakudo skip 'substr on juctions'
{
is substr("abcd", 1, 2), "bc", "simple substr";
@@ -349,4 +349,23 @@ ok ?(undef & undef ~~ undef), 'undef & undef ~~ undef works';
is $res, "b";
}
+#?rakudo skip 'index on juctions'
+{
+ my $res = index(any("abcd", "qwebdd"), "b");
+ is $res.WHAT, "Junction", "index works on junctions";
+ is $res, 1;
+ is $res, 3;
+}
+
+#?rakudo skip 'index on juctions'
+{
+ my $res = index("qwebdd", "b"|"w");
+ is $res.WHAT, "Junction", "index works on junctions";
+ is $res, 1;
+ is $res, 3;
+}
+
+# my $res = index("abcd", any("b", "c")); say $z.WHAT
+
+

0 comments on commit d4cdad3

Please sign in to comment.
Something went wrong with that request. Please try again.