@@ -14,7 +14,7 @@ __DATA__
1414
1515=== TEST 1 : Set C_FUNC_TEST_1
1616-- - config
17- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
17+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
1818location = /testCFunGreeting {
1919 ngx_http_c_func_call " my_app_simple_get_greeting" ;
2020}
@@ -26,9 +26,10 @@ Content-Type: text/plain
2626-- - response_body_like eval
2727qr/ greeting from ngx_http_c_func testing$/
2828
29+
2930=== TEST 2 : Set C_FUNC_TEST_ARGS
3031-- - config
31- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
32+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
3233location = /testCFunARGS {
3334 ngx_http_c_func_call " my_app_simple_get_args" ;
3435}
@@ -43,7 +44,7 @@ qr/greeting=hello_nginx\?id=129310923$/
4344
4445=== TEST 3 : Set C_FUNC_TEST_POST_NONE
4546-- - config
46- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
47+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
4748location = /testCFunPOSTBody {
4849 ngx_http_c_func_call " my_app_simple_post" ;
4950}
5960
6061=== TEST 4 : Set C_FUNC_TEST_GET_TOKEN
6162-- - config
62- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
63+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
6364location = /testCFunCVerifyToken {
6465 ngx_http_c_func_call " my_app_simple_get_token_args" ;
6566}
@@ -74,7 +75,7 @@ qr/QVNKS0pDQVNLTEpDS0xBU0pXbGtlandrbGplIGpka2FqbGthc2tsZGtqbHNrICBrZGpha2xzZGphc
7475
7576=== TEST 5 : Set C_FUNC_TEST_GET_ERROR_RESP
7677-- - config
77- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
78+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
7879location = /testCFUNCERRORRESP {
7980 ngx_http_c_func_call " my_app_simple_get_no_resp" ;
8081}
@@ -87,7 +88,7 @@ Content-Type: text/html
8788
8889=== TEST 6 : Set C_FUNC_TEST_GET_CALLOC_FROM_POOL
8990-- - config
90- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
91+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
9192location = /testCFUNCCallocFromPool {
9293 ngx_http_c_func_call " my_app_simple_get_calloc_from_pool" ;
9394}
@@ -102,7 +103,7 @@ qr/This is the message calloc from pool$/
102103
103104=== TEST 7 : Set C_FUNC_TEST_POST_BODY
104105-- - config
105- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
106+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
106107location = /testCFunPOSTBody {
107108 ngx_http_c_func_call " my_app_simple_post" ;
108109}
@@ -118,7 +119,7 @@ qr/greeting=enjoy-http-c-function-testing$/
118119
119120=== TEST 8 : Set C_FUNC_TEST_CACHE
120121-- - config
121- ngx_http_c_func_link_lib " /home/dispatch/testMap/c-lib /nginx-c-function/t/libcfuntest.so" ;
122+ ngx_http_c_func_link_lib " /home/taymindis/github /nginx-c-function/t/libcfuntest.so" ;
122123location = /testCFunGetCache {
123124 ngx_http_c_func_call " my_app_simple_get_cache" ;
124125}
@@ -129,3 +130,68 @@ POST /testCFunGetCache
129130Content-Type: text/ plain
130131-- - response_body_like eval
131132qr/ This is cache value $/
133+
134+
135+ === TEST 9 : Set C_FUNC_TEST_VARIABLE
136+ -- - config
137+ ngx_http_c_func_link_lib " /home/taymindis/github/nginx-c-function/t/libcfuntest.so" ;
138+ location = /testCFunGreeting {
139+ ngx_http_c_func_call " my_app_simple_get_greeting" respTo= myRespVariable;
140+ return 200 $ myRespVariable ;
141+ }
142+ --- request
143+ GET /testCFunGreeting
144+ -- - error_code: 200
145+ -- - response_headers
146+ Content-Type: text/ plain
147+ -- - response_body_like eval
148+ qr/ greeting from ngx_http_c_func testing$/
149+
150+
151+ === TEST 10 : Set C_FUNC_TEST_ARGS_AND_VARIABLE
152+ -- - config
153+ ngx_http_c_func_link_lib " /home/taymindis/github/nginx-c-function/t/libcfuntest.so" ;
154+ location = /testCFunARGS {
155+ ngx_http_c_func_call " my_app_simple_get_args" respTo= simpleRespVariable;
156+ return 200 $ simpleRespVariable ;
157+ }
158+ --- request
159+ GET /testCFunARGS? greeting= hello_nginx? id= 129310923
160+ -- - error_code: 200
161+ -- - response_headers
162+ Content-Type: text/ plain
163+ -- - response_body_like eval
164+ qr/ greeting= hello_nginx\? id= 129310923 $/
165+
166+
167+ === TEST 11 : Set C_FUNC_AIO_THREADS_TEST_ARGS_AND_VARIABLE
168+ -- - config
169+ aio threads;
170+ ngx_http_c_func_link_lib " /home/taymindis/github/nginx-c-function/t/libcfuntest.so" ;
171+ location = /testCFunARGS {
172+ ngx_http_c_func_call " my_app_simple_get_args" respTo= simpleRespVariable;
173+ return 200 $ simpleRespVariable ;
174+ }
175+ --- request
176+ GET /testCFunARGS? greeting= hello_nginx? id= 129310923
177+ -- - error_code: 200
178+ -- - response_headers
179+ Content-Type: text/ plain
180+ -- - response_body_like eval
181+ qr/ greeting= hello_nginx\? id= 129310923 $/
182+
183+
184+ === TEST 12 : Set C_FUNC_AIO_THREADS_TEST
185+ -- - config
186+ aio threads;
187+ ngx_http_c_func_link_lib " /home/taymindis/github/nginx-c-function/t/libcfuntest.so" ;
188+ location = /testCFunGreeting {
189+ ngx_http_c_func_call " my_app_simple_get_greeting" ;
190+ }
191+ --- request
192+ GET /testCFunGreeting
193+ -- - error_code: 200
194+ -- - response_headers
195+ Content-Type: text/ plain
196+ -- - response_body_like eval
197+ qr/ greeting from ngx_http_c_func testing$/
0 commit comments