changes_doesnt_leak.lua 278 B

1234567891011
  1. local A = assert
  2. local c = uci.cursor(os.getenv("CONFIG_DIR"))
  3. A(c:set("network", "lan", "dns", {
  4. "ns1.king.banik.cz",
  5. "ns2.openwrt.org",
  6. }))
  7. local changes = c:changes()
  8. A(changes.network.lan.dns[1] == "ns1.king.banik.cz")
  9. A(changes.network.lan.dns[2] == "ns2.openwrt.org")