summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar/test/test.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tar/test/test.h')
-rw-r--r--usr.bin/tar/test/test.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/usr.bin/tar/test/test.h b/usr.bin/tar/test/test.h
index 416f0dd..39a9837 100644
--- a/usr.bin/tar/test/test.h
+++ b/usr.bin/tar/test/test.h
@@ -31,8 +31,18 @@
* The goal of this file (and the matching test.c) is to
* simplify the very repetitive test-*.c test programs.
*/
-#ifndef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
+#if defined(HAVE_CONFIG_H)
+/* Most POSIX platforms use the 'configure' script to build config.h */
+#include "../../config.h"
+#elif defined(__FreeBSD__)
+/* Building as part of FreeBSD system requires a pre-built config.h. */
+#include "../config_freebsd.h"
+#elif defined(_WIN32)
+/* Win32 can't run the 'configure' script. */
+#include "../config_windows.h"
+#else
+/* Warn if the library hasn't been (automatically or manually) configured. */
+#error Oops: No config.h and no pre-built configuration in test.h.
#endif
#include <dirent.h>
@@ -51,20 +61,6 @@
#include <dmalloc.h>
#endif
-#if defined(HAVE_CONFIG_H)
-/* Most POSIX platforms use the 'configure' script to build config.h */
-#include "../../config.h"
-#elif defined(__FreeBSD__)
-/* Building as part of FreeBSD system requires a pre-built config.h. */
-#include "../config_freebsd.h"
-#elif defined(_WIN32)
-/* Win32 can't run the 'configure' script. */
-#include "../config_windows.h"
-#else
-/* Warn if the library hasn't been (automatically or manually) configured. */
-#error Oops: No config.h and no pre-built configuration in test.h.
-#endif
-
/* No non-FreeBSD platform will have __FBSDID, so just define it here. */
#ifdef __FreeBSD__
#include <sys/cdefs.h> /* For __FBSDID */
@@ -108,6 +104,9 @@
/* Assert that a file exists; supports printf-style arguments. */
#define assertFileNotExists \
test_setup(__FILE__, __LINE__);test_assert_file_not_exists
+/* Assert that file contents match a string; supports printf-style arguments. */
+#define assertFileContents \
+ test_setup(__FILE__, __LINE__);test_assert_file_contents
/*
* This would be simple with C99 variadic macros, but I don't want to
OpenPOWER on IntegriCloud