X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-import.t;h=8fdd778f434ece8c898e7adc7eefe068dbdd96c6;hb=bdc2a15aa5ca3f57b45d2c6e560f110c91b2ae87;hp=6b858496ee3102ea3eaf93077eb8ccc3ece46546;hpb=9e65e9bfbd5fa2ee747e865d1471b26ec229383c;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/01-import.t b/t/01-import.t index 6b85849..8fdd778 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,11 +3,30 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 2 * 19; require Variable::Magic; -for (qw/wizard gensig getsig cast getdata dispell SIG_MIN SIG_MAX SIG_NBR MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_UNDEF_CLEAR/) { +my %syms = ( + wizard => undef, + cast => '\[$@%&*]$@', + getdata => '\[$@%&*]$', + dispell => '\[$@%&*]$', + map { $_ => '' } qw/ + MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR + VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID + VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID + VMG_COMPAT_ARRAY_UNDEF_CLEAR + VMG_COMPAT_SCALAR_LENGTH_NOLEN + VMG_COMPAT_GLOB_GET + VMG_PERL_PATCHLEVEL + VMG_THREADSAFE VMG_FORKSAFE + VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT + / +); + +for (sort keys %syms) { eval { Variable::Magic->import($_) }; - ok(!$@, 'import ' . $_); + is $@, '', "import $_"; + is prototype($_), $syms{$_}, "prototype $_"; }