FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
test_Prune.c File Reference

Unit test cases for Prune() More...

#include "run_tests.h"
Include dependency graph for test_Prune.c:

Go to the source code of this file.

Functions

int PruneInit ()
 initialize
 
int PruneClean ()
 clean env and others
 
void testPruneFileFileSzieIs0 ()
 regular file, size is 0 More...
 
void testPruneRegFile ()
 regular file, size is great than 0 More...
 

Variables

static char * Fname = ""
 
struct stat Stat
 
static char * Dst = NULL
 
static int Result = 0
 
CU_TestInfo Prune_testcases []
 Prune() test cases. More...
 

Detailed Description

Unit test cases for Prune()

Definition in file test_Prune.c.

Function Documentation

void testPruneFileFileSzieIs0 ( )

regular file, size is 0

Test:
  1. Copy a null file (size 0) and call Prune()
  2. Check if directory is removed

Definition at line 55 of file test_Prune.c.

void testPruneRegFile ( )

regular file, size is great than 0

Test:
  1. Copy a regular file and call Prune()
  2. Check if directory is not removed

Definition at line 74 of file test_Prune.c.

Variable Documentation

CU_TestInfo Prune_testcases[]
Initial value:
=
{
{"Prune: file size is 0", testPruneFileFileSzieIs0},
{"Prune: regular file, size > 0", testPruneRegFile},
CU_TEST_INFO_NULL
}
void testPruneFileFileSzieIs0()
regular file, size is 0
Definition: test_Prune.c:55
void testPruneRegFile()
regular file, size is great than 0
Definition: test_Prune.c:74

Prune() test cases.

Definition at line 110 of file test_Prune.c.