]> git.vpit.fr Git - perl/modules/Linux-SysInfo.git/commitdiff
Test import and prototypes in t/01-import.t
authorVincent Pit <vince@profvince.com>
Tue, 10 Mar 2009 16:12:38 +0000 (17:12 +0100)
committerVincent Pit <vince@profvince.com>
Tue, 10 Mar 2009 16:12:38 +0000 (17:12 +0100)
MANIFEST
SysInfo.xs
t/01-import.t [new file with mode: 0644]

index 275cab84c7db610865314bcff11a5add02f174d3..0deae0e80e4efae3616f15f7263611797078e3fc 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,6 +7,7 @@ SysInfo.xs
 lib/Linux/SysInfo.pm
 samples/sysinfo.pl
 t/00-load.t
+t/01-import.t
 t/10-standard.t
 t/20-extended.t
 t/90-boilerplate.t
index fdb289e362e098082baa99f83bbf18e6c613d401..e46439c208546abb441f0782c53d85ce91f09e82 100644 (file)
@@ -94,6 +94,7 @@ BOOT:
 }
 
 SV *sysinfo()
+PROTOTYPE:
 PREINIT:
  struct sysinfo si;
  NV l;
diff --git a/t/01-import.t b/t/01-import.t
new file mode 100644 (file)
index 0000000..8a3b3da
--- /dev/null
@@ -0,0 +1,19 @@
+#!perl -T
+
+use strict;
+use warnings;
+
+use Test::More tests => 2 * 2;
+
+require Linux::SysInfo;
+
+my %syms = (
+ sysinfo         => '',
+ LS_HAS_EXTENDED => '',
+);
+
+for (keys %syms) {
+ eval { Linux::SysInfo->import($_) };
+ is $@,            '',        "import $_";
+ is prototype($_), $syms{$_}, "prototype $_";
+}