Apache HTTPD
Macros | Functions | Variables
testbuckets.c File Reference
#include "abts.h"
#include "testutil.h"
#include "apr_buckets.h"
#include "apr_strings.h"

Go to the source code of this file.

Macros

#define COUNT   3000
 
#define THESTR   "hello"
 
#define TIF_FNAME   "testfile.txt"
 

Functions

static void test_create (abts_case *tc, void *data)
 
static void test_simple (abts_case *tc, void *data)
 
static apr_bucket_brigademake_simple_brigade (apr_bucket_alloc_t *ba, const char *first, const char *second)
 
static void flatten_match (abts_case *tc, const char *ctx, apr_bucket_brigade *bb, const char *expect)
 
static void test_flatten (abts_case *tc, void *data)
 
static int count_buckets (apr_bucket_brigade *bb)
 
static void test_split (abts_case *tc, void *data)
 
static void test_bwrite (abts_case *tc, void *data)
 
static void test_splitline (abts_case *tc, void *data)
 
static void test_bucket_content (abts_case *tc, apr_bucket *e, const char *edata, apr_size_t elen)
 
static void test_splits (abts_case *tc, void *ctx)
 
static void test_insertfile (abts_case *tc, void *ctx)
 
static apr_file_tmake_test_file (abts_case *tc, const char *fname, const char *contents)
 
static void test_manyfile (abts_case *tc, void *data)
 
static void test_truncfile (abts_case *tc, void *data)
 
static void test_partition (abts_case *tc, void *data)
 
static void test_write_split (abts_case *tc, void *data)
 
static void test_write_putstrs (abts_case *tc, void *data)
 
abts_suitetestbuckets (abts_suite *suite)
 

Variables

static const char hello [] = "hello, world"
 

Macro Definition Documentation

◆ COUNT

#define COUNT   3000

Definition at line 165 of file testbuckets.c.

◆ THESTR

#define THESTR   "hello"

Definition at line 166 of file testbuckets.c.

◆ TIF_FNAME

#define TIF_FNAME   "testfile.txt"

Definition at line 305 of file testbuckets.c.

Function Documentation

◆ count_buckets()

static int count_buckets ( apr_bucket_brigade bb)
static

Definition at line 126 of file testbuckets.c.

◆ flatten_match()

static void flatten_match ( abts_case tc,
const char ctx,
apr_bucket_brigade bb,
const char expect 
)
static

Definition at line 94 of file testbuckets.c.

◆ make_simple_brigade()

static apr_bucket_brigade * make_simple_brigade ( apr_bucket_alloc_t ba,
const char first,
const char second 
)
static

Definition at line 77 of file testbuckets.c.

◆ make_test_file()

static apr_file_t * make_test_file ( abts_case tc,
const char fname,
const char contents 
)
static

< Open the file for reading

< Open the file for writing

< Open the file and truncate to 0 length

< Create the file if not there

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 364 of file testbuckets.c.

◆ test_bucket_content()

static void test_bucket_content ( abts_case tc,
apr_bucket e,
const char edata,
apr_size_t  elen 
)
static

Definition at line 213 of file testbuckets.c.

◆ test_bwrite()

static void test_bwrite ( abts_case tc,
void *  data 
)
static

Definition at line 168 of file testbuckets.c.

◆ test_create()

static void test_create ( abts_case tc,
void *  data 
)
static

Definition at line 22 of file testbuckets.c.

◆ test_flatten()

static void test_flatten ( abts_case tc,
void *  data 
)
static

Definition at line 113 of file testbuckets.c.

◆ test_insertfile()

static void test_insertfile ( abts_case tc,
void *  ctx 
)
static

< Open the file for writing

< Open the file and truncate to 0 length

< Create the file if not there

< Platform dependent flag to enable * sparse file support, see WARNING below

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 307 of file testbuckets.c.

◆ test_manyfile()

static void test_manyfile ( abts_case tc,
void *  data 
)
static

Definition at line 380 of file testbuckets.c.

◆ test_partition()

static void test_partition ( abts_case tc,
void *  data 
)
static

Definition at line 444 of file testbuckets.c.

◆ test_simple()

static void test_simple ( abts_case tc,
void *  data 
)
static

Definition at line 37 of file testbuckets.c.

◆ test_split()

static void test_split ( abts_case tc,
void *  data 
)
static

Definition at line 140 of file testbuckets.c.

◆ test_splitline()

static void test_splitline ( abts_case tc,
void *  data 
)
static

Definition at line 191 of file testbuckets.c.

◆ test_splits()

static void test_splits ( abts_case tc,
void *  ctx 
)
static

Definition at line 229 of file testbuckets.c.

◆ test_truncfile()

static void test_truncfile ( abts_case tc,
void *  data 
)
static

Definition at line 409 of file testbuckets.c.

◆ test_write_putstrs()

static void test_write_putstrs ( abts_case tc,
void *  data 
)
static

Definition at line 491 of file testbuckets.c.

◆ test_write_split()

static void test_write_split ( abts_case tc,
void *  data 
)
static

Definition at line 472 of file testbuckets.c.

◆ testbuckets()

abts_suite * testbuckets ( abts_suite suite)

Definition at line 514 of file testbuckets.c.

Variable Documentation

◆ hello

const char hello[] = "hello, world"
static

Definition at line 442 of file testbuckets.c.