You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
560 B
C
35 lines
560 B
C
#include "test.h"
|
|
|
|
#include "trie.h"
|
|
|
|
#include <sys/stat.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
#define TEST_DB "/tmp/ffdb-test"
|
|
|
|
static bool test_1_simple_set()
|
|
{
|
|
bool result = true;
|
|
|
|
result &= ffdb_trie_set( TEST_DB, "https://example.com/actor", "T" );
|
|
result &= ffdb_trie_set( TEST_DB, "https://apogee.polaris-1.work/owner/actor", "T" );
|
|
|
|
if( !result ) {
|
|
printf( "[FAILED] ffdb test 1: simple set\n" );
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
bool ffdb_test()
|
|
{
|
|
system( "rm -Rvf " TEST_DB );
|
|
mkdir( TEST_DB, 0755 );
|
|
|
|
return true &&
|
|
test_1_simple_set()
|
|
;
|
|
}
|
|
|