diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-03-14 15:09:17 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-03-14 15:09:17 +0300 |
commit | 612c083579a78c9d51fa9976e46f45b6cbaf93db (patch) | |
tree | af98c29218956c418c3e51dfbdb42de66c913acf /test/nxt_utf8_file_name_test.c | |
parent | 6f2c9acd1841ca20a1388b34aef64e9f00459090 (diff) | |
download | unit-612c083579a78c9d51fa9976e46f45b6cbaf93db.tar.gz unit-612c083579a78c9d51fa9976e46f45b6cbaf93db.tar.bz2 |
Fixed unit tests building broken by the previous commit.
Diffstat (limited to '')
-rw-r--r-- | test/nxt_utf8_file_name_test.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/nxt_utf8_file_name_test.c b/test/nxt_utf8_file_name_test.c index a0ed91ec..4481ad38 100644 --- a/test/nxt_utf8_file_name_test.c +++ b/test/nxt_utf8_file_name_test.c @@ -9,10 +9,13 @@ extern char **environ; - static nxt_int_t nxt_utf8_file_name_test(nxt_thread_t *thr); +nxt_module_init_t nxt_init_modules[0]; +nxt_uint_t nxt_init_modules_n; + + int nxt_cdecl main(int argc, char **argv) { @@ -41,6 +44,7 @@ nxt_utf8_file_name_test(nxt_thread_t *thr) ssize_t n; uint32_t uc, lc; nxt_int_t ret; + nxt_task_t *task = NULL; nxt_file_t uc_file, lc_file; const u_char *pp; nxt_file_name_t uc_name[10], lc_name[10]; @@ -102,7 +106,7 @@ nxt_utf8_file_name_test(nxt_thread_t *thr) *p = '\0'; - ret = nxt_file_open(&uc_file, NXT_FILE_WRONLY, NXT_FILE_TRUNCATE, + ret = nxt_file_open(task, &uc_file, NXT_FILE_WRONLY, NXT_FILE_TRUNCATE, NXT_FILE_DEFAULT_ACCESS); if (ret != NXT_OK) { return NXT_ERROR; @@ -112,15 +116,15 @@ nxt_utf8_file_name_test(nxt_thread_t *thr) return NXT_ERROR; } - nxt_file_close(&uc_file); + nxt_file_close(task, &uc_file); - ret = nxt_file_open(&lc_file, NXT_FILE_RDONLY, NXT_FILE_OPEN, + ret = nxt_file_open(task, &lc_file, NXT_FILE_RDONLY, NXT_FILE_OPEN, NXT_FILE_DEFAULT_ACCESS); if (ret == NXT_OK) { n = nxt_file_read(&lc_file, test, 4, 0); - nxt_file_close(&lc_file); + nxt_file_close(task, &lc_file); if (n != 4 || nxt_memcmp(utf8, test, 4) != 0) { nxt_log_alert(thr->log, "nxt_file_read() mismatch"); |