Marked libisofs SVN copy as outdated (use bzr on lp)
This commit is contained in:
33
libisofs_outdated/attic/test/test_exclude.c
Normal file
33
libisofs_outdated/attic/test/test_exclude.c
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Unit test for exclude.h
|
||||
*/
|
||||
|
||||
|
||||
#include "exclude.h"
|
||||
#include "test.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void test_exclude()
|
||||
{
|
||||
struct iso_hash_table table = { {0,}, 0};
|
||||
CU_ASSERT_FALSE( iso_exclude_lookup(&table, "/dir") );
|
||||
CU_ASSERT_FALSE( iso_exclude_lookup(&table, "/otherdir") );
|
||||
iso_exclude_add_path(&table, "/otherdir");
|
||||
CU_ASSERT_TRUE( iso_exclude_lookup(&table, "/otherdir") );
|
||||
CU_ASSERT_FALSE( iso_exclude_lookup(&table, "/dir") );
|
||||
iso_exclude_add_path(&table, "/dir");
|
||||
CU_ASSERT_TRUE( iso_exclude_lookup(&table, "/otherdir") );
|
||||
CU_ASSERT_TRUE( iso_exclude_lookup(&table, "/dir") );
|
||||
iso_exclude_empty(&table);
|
||||
CU_ASSERT_FALSE( iso_exclude_lookup(&table, "/dir") );
|
||||
CU_ASSERT_FALSE( iso_exclude_lookup(&table, "/otherdir") );
|
||||
}
|
||||
|
||||
void add_exclude_suite()
|
||||
{
|
||||
CU_pSuite pSuite = CU_add_suite("ExcludeSuite", NULL, NULL);
|
||||
|
||||
CU_add_test(pSuite, "test of exclude", test_exclude);
|
||||
}
|
Reference in New Issue
Block a user