FOSSology  4.4.0
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 Statf
 
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

◆ testPruneFileFileSzieIs0()

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 44 of file test_Prune.c.

◆ testPruneRegFile()

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 63 of file test_Prune.c.

Variable Documentation

◆ Prune_testcases

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

Prune() test cases.

Definition at line 99 of file test_Prune.c.