17 #include "run_tests.h" 22 static int DestLen = 4096;
29 void testTaintString1()
32 char *
Src =
"test%sTaintstring";
34 FO_ASSERT_EQUAL(
Result, 0);
35 FO_ASSERT_STRING_EQUAL(Dest,
"testReplaceTaintstring");
42 void testTaintString2()
45 char *
Src =
"test\'Taintstring";
47 FO_ASSERT_EQUAL(
Result, 0);
48 FO_ASSERT_STRING_EQUAL(Dest,
"test'\\''Taintstring");
55 void testTaintString3()
58 char *
Src =
"test\\Taintstring";
60 FO_ASSERT_EQUAL(
Result, 0);
61 FO_ASSERT_STRING_EQUAL(Dest,
"test\\\\Taintstring");
69 void testTaintString4()
72 char *
Src =
"test\'Taintstring";
74 FO_ASSERT_EQUAL(
Result, 0);
75 FO_ASSERT_STRING_EQUAL(Dest,
"test'Taintstring");
84 {
"TaintString1:", testTaintString1},
85 {
"TaintString2:", testTaintString2},
86 {
"TaintString3:", testTaintString3},
87 {
"TaintString4:", testTaintString4},
static int Result
Result of calls.
CU_TestInfo TaintString_testcases[]
TaintString() test cases.
static char * Src
Souce location.
char * TaintString(char *S)
Create a string with taint quoting.