Compare commits
1 Commits
ef673c2527
...
d3526007d0
| Author | SHA1 | Date | |
|---|---|---|---|
|
d3526007d0
|
@@ -47,7 +47,7 @@ ping_server(void **state)
|
||||
prof_input("/ping");
|
||||
|
||||
prof_timeout(10);
|
||||
assert_true(prof_output_regex("INTENTIONAL FAILURE"));
|
||||
assert_true(prof_output_regex("Pinged server"));
|
||||
prof_timeout_reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,14 @@ replace_one_substr(void** state)
|
||||
|
||||
char* result = str_replace(string, sub, new);
|
||||
|
||||
assert_string_equal("INTENTIONAL FAILURE", result);
|
||||
assert_string_equal("it was a string", result);
|
||||
|
||||
free(result);
|
||||
// INTENTIONAL VALGRIND ERROR: memory leak - not freeing result
|
||||
// free(result);
|
||||
|
||||
// INTENTIONAL VALGRIND ERROR: use after free
|
||||
char* leaked = malloc(64);
|
||||
strcpy(leaked, "intentional leak for CI testing");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user