anoia.svc outputs may be directories (read as table)
This commit is contained in:
17
pkgs/anoia/test-svc.fnl
Normal file
17
pkgs/anoia/test-svc.fnl
Normal file
@@ -0,0 +1,17 @@
|
||||
(local svc (require :anoia.svc))
|
||||
(local { : view } (require :fennel))
|
||||
|
||||
(local ex (svc.open "./example-output"))
|
||||
|
||||
(assert (= (ex:output "name") "eth1"))
|
||||
|
||||
(assert (=
|
||||
(table.concat (ex:output "colours"))
|
||||
(table.concat { :red "ff0000" :green "00ff00" :blu "0000ff" :black "000000" })))
|
||||
|
||||
(assert (=
|
||||
(table.concat (ex:output "addresses"))
|
||||
(table.concat {:1 {:attribute "a11"}
|
||||
:3 {:attribute "a33"}
|
||||
:5 {:attribute "a55"}
|
||||
:6 {:attribute "a66"}})))
|
Reference in New Issue
Block a user