diff --git a/test/test_trafficserver.aug b/test/test_trafficserver.aug index f964375..4f393d4 100644 --- a/test/test_trafficserver.aug +++ b/test/test_trafficserver.aug @@ -41,3 +41,27 @@ module Test_trafficserver = {"@action" = "allow"} } + let _ = print_regexp (lens_ctype Trafficserver_records.records_lns) + let _ = print_endline "" + + test Trafficserver_records.records_lns get "CONFIG proxy.config.net.sock_send_buffer_size_in INT 262144 +CONFIG proxy.config.net.sock_recv_buffer_size_in INT 0 +CONFIG proxy.config.net.sock_send_buffer_size_out INT 0 +CONFIG proxy.config.net.sock_recv_buffer_size_out INT 0\n" = + { "proxy.config.net.sock_send_buffer_size_in" = "262144" + { "type" = "CONFIG" } + { "value_type" = "INT" } + } + { "proxy.config.net.sock_recv_buffer_size_in" = "0" + { "type" = "CONFIG" } + { "value_type" = "INT" } + } + { "proxy.config.net.sock_send_buffer_size_out" = "0" + { "type" = "CONFIG" } + { "value_type" = "INT" } + } + { "proxy.config.net.sock_recv_buffer_size_out" = "0" + { "type" = "CONFIG" } + { "value_type" = "INT" } + } + diff --git a/trafficserver_records.aug b/trafficserver_records.aug index 2470f78..b7126db 100644 --- a/trafficserver_records.aug +++ b/trafficserver_records.aug @@ -8,7 +8,7 @@ module Trafficserver_records = let spc = Util.del_ws_spc let type_re = "CONFIG" | "PROCESS" | "NODE" | "CLUSTER" | "LOCAL" | "PLUGIN" let key_re = /[A-Za-z0-9_.-]+/ - let value_re = /[^ \t\n#]([^#]*[^ \t\n#])?/ + let value_re = /[^ \t\n#]([^\n#]*[^ \t\n#])?/ let value_type_re = "INT" | "FLOAT" | "STRING" | "COUNTER" let records_entry = [ [ label "type" . store type_re] . spc . key key_re . spc . [ label "value_type" . store value_type_re ] . spc . store value_re . eol ]