FOSSology  4.4.0
Open Source License Compliance by Open Source Software
test_IsFunctions.c
Go to the documentation of this file.
1 /*
2  SPDX-FileCopyrightText: © 2012 Hewlett-Packard Development Company, L.P.
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 #include "run_tests.h"
7 
8 static int Result = 0;
20 {
21  char *Filename = "../testdata/test_1-1.dsc";
23  FO_ASSERT_EQUAL(Result, 1);
24 }
25 
33 {
34  char *Filename = "../testdata/test_1.orig.tar.gz";
36  FO_ASSERT_EQUAL(Result, 0);
37 }
38 
46 {
47  char *Filename = "../testdata/test.exe";
48  Result = IsExe(Filename, 1);
49  FO_ASSERT_EQUAL(Result, 1);
50 }
51 
59 {
60  char *Filename = "../testdata/test_1.orig.tar.gz";
61  Result = IsExe(Filename, 1);
62  FO_ASSERT_EQUAL(Result, 0);
63 }
64 
65 /* ************************************************************************** */
66 /* **** cunit test cases **************************************************** */
67 /* ************************************************************************** */
68 
69 CU_TestInfo IsFunctions_testcases[] =
70 {
71  {"IsDebianSourceFile:", testIsDebianSourceFile},
72  {"IsNotDebianSourceFile:", testIsNotDebianSourceFile},
74  {"IsNotExeFile:", testIsNotExeFile},
75  CU_TEST_INFO_NULL
76 };
static int Result
Result of calls.
Definition: test_CopyFile.c:17
void testIsDebianSourceFile()
function IsDebianSourceFile(char *Filename)
void testIsNotDebianSourceFile()
function IsDebianSourceFile(char *Filename)
void testIsExeFile()
function IsExe(char *Filename)
CU_TestInfo IsFunctions_testcases[]
Isxxx() test cases.
void testIsNotExeFile()
function IsExe(char *Filename)
int IsDebianSourceFile(char *Filename)
Read file to see if it is a Debian source file.
Definition: utils.c:733
int IsExe(char *Exe, int Quiet)
Check if the executable exists.
Definition: utils.c:393
char * Filename
Filename.
Definition: run_tests.c:17