Skip to content

Commit

Permalink
check: add test for uwsgi_opt_set_int with when used with optional_ar…
Browse files Browse the repository at this point in the history
…gument
  • Loading branch information
awelzel committed Jun 26, 2019
1 parent fcaeb88 commit 4c26861
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions check/check_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ START_TEST(test_uwsgi_opt_set_int)

uwsgi_opt_set_int("", "60", &result);
ck_assert(result == 60);

// When used with "optional_argument", value will be passed as NULL
// when used in --option form without an argument.
uwsgi_opt_set_int("", NULL, &result);
ck_assert(result == 1);
}
END_TEST

Expand Down

0 comments on commit 4c26861

Please sign in to comment.