tokenize from cli (full circle)

This commit is contained in:
Christoph J. Scherr 2024-02-15 14:50:48 +01:00
parent 7176181aef
commit 302d60a061
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 5 additions and 4 deletions

View File

@ -60,10 +60,11 @@ function dump(t)
end
function main()
local mockargs =
[[--name "tls_service_rs" --base-dir ${PWD%/*/*} --log-level "TRACE" -j '{ "MODE": "server", "CERT": "data/server.crt", "KEY": "data/server.key", "CHAIN": "data/root.crt", "ADDR": "127.0.0.1:9999", "HOSTNAME": "localhost" }']]
print(mockargs)
local split = tokenize_args(mockargs)
if arg[1] == nil then
print("need to give an argument (probably a string)")
return
end
local split = tokenize_args(arg[1])
print(dump(split))
end