mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 10:28:09 +01:00
test: move system includes to notmuch-test.h
This removes some redudant includes, and will also make it easier to introduce "#define _GNU_SOURCE", which must come before all system includes.
This commit is contained in:
parent
18cdd21b8b
commit
1643c0459a
11 changed files with 12 additions and 30 deletions
|
@ -9,10 +9,8 @@ test_begin_subtest "building database"
|
|||
test_expect_success "NOTMUCH_NEW"
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <stdio.h>
|
||||
#include <notmuch.h>
|
||||
#include <notmuch-test.h>
|
||||
#include <talloc.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
notmuch_database_t *db;
|
||||
|
|
|
@ -9,10 +9,8 @@ test_begin_subtest "building database"
|
|||
test_expect_success "NOTMUCH_NEW"
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <stdio.h>
|
||||
#include <notmuch.h>
|
||||
#include <notmuch-test.h>
|
||||
#include <talloc.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
notmuch_database_t *db;
|
||||
|
|
|
@ -9,10 +9,8 @@ test_begin_subtest "building database"
|
|||
test_expect_success "NOTMUCH_NEW"
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <stdio.h>
|
||||
#include <notmuch.h>
|
||||
#include <notmuch-test.h>
|
||||
#include <talloc.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
notmuch_database_t *db;
|
||||
|
|
|
@ -19,9 +19,8 @@ cat <<'EOF' > c_tail
|
|||
EOF
|
||||
|
||||
cat <<EOF > c_head0
|
||||
#include <stdio.h>
|
||||
#include <notmuch.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
notmuch_database_t *db;
|
||||
|
|
|
@ -24,9 +24,8 @@ cat <<'EOF' > c_tail
|
|||
EOF
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <stdio.h>
|
||||
#include <notmuch.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
notmuch_database_t *db;
|
||||
|
|
|
@ -23,8 +23,6 @@ EOF
|
|||
}
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
|
@ -639,8 +637,6 @@ cp notmuch-config.bak notmuch-config
|
|||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
cat <<EOF > c_head2
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
|
|
|
@ -6,8 +6,6 @@ test_description="library reopen API"
|
|||
add_email_corpus
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
|
|
|
@ -6,10 +6,6 @@ test_description="message property API"
|
|||
add_email_corpus
|
||||
|
||||
cat <<EOF > c_head
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <talloc.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
void print_properties (notmuch_message_t *message, const char *prefix, notmuch_bool_t exact) {
|
||||
|
|
|
@ -9,9 +9,6 @@ if [ $NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK -ne 1 ]; then
|
|||
test_subtest_known_broken
|
||||
fi
|
||||
test_C ${MAIL_DIR} <<'EOF'
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/wait.h>
|
||||
#include <notmuch-test.h>
|
||||
|
||||
void
|
||||
|
|
|
@ -10,11 +10,8 @@ test_begin_subtest "catching DatabaseModifiedError in _notmuch_message_ensure_me
|
|||
first_id=$(notmuch search --output=messages '*'| head -1 | sed s/^id://)
|
||||
|
||||
test_C ${MAIL_DIR} <<EOF
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <notmuch-test.h>
|
||||
#include <talloc.h>
|
||||
#include <assert.h>
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
#ifndef _NOTMUCH_TEST_H
|
||||
#define _NOTMUCH_TEST_H
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <talloc.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <notmuch.h>
|
||||
|
||||
inline static void
|
||||
|
|
Loading…
Reference in a new issue