diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-08-15 08:36:04 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-08-15 08:36:04 +0100 |
commit | 422d46d06a84d0b8194a53de4ad242dbeea85c52 (patch) | |
tree | 14c19bacc3da9cc004a202e4343f91282c276b99 /lib | |
parent | e0b21193257f9784b28e931525f2a382a74775c6 (diff) | |
download | hivex-422d46d06a84d0b8194a53de4ad242dbeea85c52.tar.gz hivex-422d46d06a84d0b8194a53de4ad242dbeea85c52.tar.xz hivex-422d46d06a84d0b8194a53de4ad242dbeea85c52.zip |
header: Fix including just <hivex.h>.
Also this adds a regression test so we don't break it in future.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 15 | ||||
-rw-r--r-- | lib/test-just-header.c | 30 |
2 files changed, 44 insertions, 1 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 7e5b92b..12f415a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,5 @@ # hivex -# Copyright (C) 2009-2010 Red Hat Inc. +# Copyright (C) 2009-2011 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -63,3 +63,16 @@ $(top_builddir)/html/hivex.3.html: hivex.pod $< CLEANFILES = $(man_MANS) + +# Tests. + +check_PROGRAMS = test-just-header + +TESTS = test-just-header + +test_just_header_SOURCES = test-just-header.c +test_just_header_CFLAGS = \ + -I$(top_srcdir)/lib -I$(top_builddir)/lib \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) +test_just_header_LDADD = \ + $(top_builddir)/lib/libhivex.la diff --git a/lib/test-just-header.c b/lib/test-just-header.c new file mode 100644 index 0000000..ee81e21 --- /dev/null +++ b/lib/test-just-header.c @@ -0,0 +1,30 @@ +/* hivex + * Copyright (C) 2010-2011 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* Check that just including the header and nothing else works, ie. + * that there are no implicit dependencies in the header file. + */ + +#include "hivex.h" + +int +main (int argc, char *argv[]) +{ + hive_h *h = hivex_open ("../images/minimal", 0); + return 0; +} |