From 5eefb9dc70b9e33114e57cb8ad325b8a45f05e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Sat, 12 Mar 2022 21:54:40 +0800 Subject: [PATCH] more tests --- test_scripts/nested_exit.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_scripts/nested_exit.lua b/test_scripts/nested_exit.lua index 22cd3fa..1693825 100644 --- a/test_scripts/nested_exit.lua +++ b/test_scripts/nested_exit.lua @@ -1,8 +1,12 @@ local function nested_e() - ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) + if true then + ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) + else + return "FOO" + end end -nested_e() +local r = nested_e() ngx.say("OK") -- ➤ curl test.localhost:8088/api/ngx/test/nested_exit