-
-
Save jnthn/36792fd1bbb7fe834b86ec0502a1b668 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use Test; | |
plan 3; | |
{ | |
my ($m1, $m2, $m3); | |
multi sub pkgname-pkgver-pkgrel(%txninfo, :@checks! where *.elems == 1) { | |
$m1 = True; | |
pkgname-pkgver-pkgrel(%txninfo, :checks(|@checks, %txninfo<pkgver>:exists)); | |
} | |
multi sub pkgname-pkgver-pkgrel(%txninfo, :@checks! where *.elems == 2) { | |
$m2 = True; | |
pkgname-pkgver-pkgrel(%txninfo, :checks(|@checks, %txninfo<pkgrel>:exists)); | |
} | |
multi sub pkgname-pkgver-pkgrel(%txninfo, :@checks! where *.elems == 3) { | |
$m3 = True; | |
@checks; | |
} | |
my %txninfo = :pkgname<name>, :pkgver<1.0>, :pkgrel(1); | |
pkgname-pkgver-pkgrel(%txninfo, :checks[%txninfo<pkgname>:exists]); | |
ok $m1, "Correctly reached first multi"; | |
ok $m2, "Correctly reached second multi"; | |
ok $m3, "Correctly reached third multi"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment