Skip to content

Commit

Permalink
fixup! Remove dead list test code
Browse files Browse the repository at this point in the history
Change-Id: I6ce08644448a50aea664762b098fb6dd62cdd63f
  • Loading branch information
schwabe committed Jan 19, 2024
1 parent b8d0caa commit 7f29c3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit_tests/openvpn/test_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ test_list(void **state)
const char *wordfile = SOURCEDIR "/COPYRIGHT.GPL";
FILE *words = fopen(wordfile, "r");

int wordcount = 0;

/* parse words from file */
while (true)
{
Expand All @@ -169,6 +171,7 @@ test_list(void **state)

char c = 0;
int bi = 0, wbi = 0;

do
{
c = buf[bi++];
Expand All @@ -181,6 +184,8 @@ test_list(void **state)
{
if (wbi)
{
printf("%d. word: %s\n", ++wordcount, wordbuf);

ASSERT(wbi < (int) sizeof(wordbuf));
wordbuf[wbi++] = '\0';

Expand Down Expand Up @@ -211,6 +216,8 @@ test_list(void **state)
while (c);
}

assert_int_equal(wordcount, 2978);

/* remove some words from the table */
{
assert_true(hash_remove(hash, "DEFECTIVE"));
Expand Down

0 comments on commit 7f29c3f

Please sign in to comment.