|
768 | 768 | #lua_shared_dict dummy 500k; |
769 | 769 |
|
770 | 770 | init_by_lua_block { |
771 | | - -- require "resty.core.regex" |
772 | | - -- assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 771 | + require "resty.core.regex" |
| 772 | + assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 773 | + assert(ngx.re.match("hi, world", [[hi, \w+]], "ji")) |
773 | 774 | } |
774 | 775 |
|
775 | 776 | --- config |
@@ -801,8 +802,9 @@ start privileged agent process |
801 | 802 | lua_shared_dict dummy 500k; |
802 | 803 |
|
803 | 804 | init_by_lua_block { |
804 | | - -- require "resty.core.regex" |
805 | | - -- assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 805 | + require "resty.core.regex" |
| 806 | + assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 807 | + assert(ngx.re.match("hi, world", [[hi, \w+]], "ji")) |
806 | 808 | } |
807 | 809 |
|
808 | 810 | --- config |
@@ -835,8 +837,9 @@ start privileged agent process |
835 | 837 |
|
836 | 838 | init_by_lua_block { |
837 | 839 | assert(require "ngx.process".enable_privileged_agent()) |
838 | | - -- require "resty.core.regex" |
839 | | - -- assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 840 | + require "resty.core.regex" |
| 841 | + assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 842 | + assert(ngx.re.match("hi, world", [[hi, \w+]], "ji")) |
840 | 843 | } |
841 | 844 |
|
842 | 845 | --- config |
@@ -870,8 +873,9 @@ qr/start privileged agent process \d+/ |
870 | 873 |
|
871 | 874 | init_by_lua_block { |
872 | 875 | assert(require "ngx.process".enable_privileged_agent()) |
873 | | - -- require "resty.core.regex" |
874 | | - -- assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 876 | + require "resty.core.regex" |
| 877 | + assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 878 | + assert(ngx.re.match("hi, world", [[hi, \w+]], "ji")) |
875 | 879 | } |
876 | 880 |
|
877 | 881 | init_worker_by_lua_block { |
@@ -909,8 +913,9 @@ qr/lua close the global Lua VM ([0-9A-F]+)$/, |
909 | 913 | proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:1m; |
910 | 914 |
|
911 | 915 | init_by_lua_block { |
912 | | - -- require "resty.core.regex" |
913 | | - -- assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 916 | + require "resty.core.regex" |
| 917 | + assert(ngx.re.match("hello, world", [[hello, \w+]], "joi")) |
| 918 | + assert(ngx.re.match("hi, world", [[hi, \w+]], "ji")) |
914 | 919 | } |
915 | 920 |
|
916 | 921 | init_worker_by_lua_block { |
|
0 commit comments