MINOR: WURFL: call header_retireve_callback() in dummy library

The current coverage of the dummy library was limited because the callbacks
passed to wurfl_lookup() were not called. Now we do call them with one existing
and one non-existing headers to make sure that ha_wurfl_retrieve_header() is
covered by the tests as well.
This commit is contained in:
mbellomi 2019-05-21 15:44:53 +02:00 committed by Willy Tarreau
parent d173e93aa7
commit e30e3001d9
1 changed files with 5 additions and 0 deletions

View File

@ -67,6 +67,11 @@ wurfl_error wurfl_load(wurfl_handle hwurfl)
wurfl_device_handle wurfl_lookup(wurfl_handle hwurfl, wurfl_header_retrieve_callback header_retrieve_callback, const void *header_retrieve_callback_data)
{
// call callback, on a probably existing header
const char *hvalue = header_retrieve_callback("User-Agent", header_retrieve_callback_data);
// and on a non existing one
hvalue = header_retrieve_callback("Non-Existing-Header", header_retrieve_callback_data);
return (void *) 0xdeffa;
}