liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

test-svc.fnl (548B)


      1 (local svc (require :anoia.svc))
      2 (local { : view } (require :fennel))
      3 
      4 (local ex (svc.open "./example-output"))
      5 
      6 (assert (= (ex:output "name") "eth1"))
      7 
      8 (assert (=
      9          (table.concat (ex:output "colours"))
     10          (table.concat { :red "ff0000" :green "00ff00" :blu "0000ff" :black "000000" })))
     11 
     12 (assert (=
     13          (table.concat (ex:output "addresses"))
     14          (table.concat {:1 {:attribute "a11"}
     15                         :3 {:attribute "a33"}
     16                         :5 {:attribute "a55"}
     17                         :6 {:attribute "a66"}})))