Browse Source

tests: cram: Lua: add test case for uci_get_errorstr

In order to extend test coverage and help testing refactoring.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar 4 years ago
parent
commit
750b046eb7
3 changed files with 4 additions and 0 deletions
  1. 1 0
      tests/cram/config/broken
  2. 2 0
      tests/cram/lua/basic.lua
  3. 1 0
      tests/cram/test_ucilua.t

+ 1 - 0
tests/cram/config/broken

@@ -0,0 +1 @@
+config alias' 'a'

+ 2 - 0
tests/cram/lua/basic.lua

@@ -42,3 +42,5 @@ local t = c:get("network", "lan", "dns")
 A(#t == 2)
 A(t[1] == "ns1.king.banik.cz")
 A(t[2] == "ns2.openwrt.org")
+
+print(c:get_all("broken"))

+ 1 - 0
tests/cram/test_ucilua.t

@@ -56,3 +56,4 @@ run basic Lua tests:
   proto: dhcp
   .anonymous: false
   aliases: c d
+  nil\tuci: Parse error (EOF with unterminated ') at line 1, byte 18 (esc)