add unit test case for pcap dependency object

pull/2130/head
Bruce Richardson 8 years ago
parent c89b8c5c4b
commit 0a6f848aa3
  1. 7
      test cases/frameworks/19 pcap/meson.build
  2. 9
      test cases/frameworks/19 pcap/pcap_prog.c

@ -0,0 +1,7 @@
project('pcap test', 'c')
pcap_dep = dependency('pcap', version : '>=1.0')
e = executable('pcap_prog', 'pcap_prog.c', dependencies : pcap_dep)
test('pcaptest', e)

@ -0,0 +1,9 @@
#include <pcap/pcap.h>
int
main()
{
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *p = pcap_create(NULL, errbuf);
return p == NULL;
}
Loading…
Cancel
Save