X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-import.t;h=8fdd778f434ece8c898e7adc7eefe068dbdd96c6;hb=8e2184e72b9ec7b9d7bddd4bf5be516f2b561db9;hp=cc4aebd733f494f25da4abebb14430149d9da0df;hpb=14f66d40970bef63105be046a109c1a32859a8a0;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/01-import.t b/t/01-import.t index cc4aebd..8fdd778 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,11 +3,30 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 2 * 19; require Variable::Magic; -for (qw/wizard gensig getsig cast getdata dispell SIG_MIN SIG_MAX SIG_NBR/) { +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 $_"; }