tests: cram: Lua: add test case for uci_get_errorstr
authorPetr Štetiar <ynezz@true.cz>
Sat, 7 Dec 2019 22:36:51 +0000 (23:36 +0100)
committerPetr Štetiar <ynezz@true.cz>
Sat, 7 Dec 2019 22:40:02 +0000 (23:40 +0100)
In order to extend test coverage and help testing refactoring.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
tests/cram/config/broken [new file with mode: 0644]
tests/cram/lua/basic.lua
tests/cram/test_ucilua.t

diff --git a/tests/cram/config/broken b/tests/cram/config/broken
new file mode 100644 (file)
index 0000000..d2ecc01
--- /dev/null
@@ -0,0 +1 @@
+config alias' 'a'
index ceb706f6973e304bc0e60bd62595443303999bad..f0052644c00e9072b758ac1c40dda85a2534a9b3 100644 (file)
@@ -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"))
index 1544e23c1bf47200e4717b6187d50afd2e387677..cfe1f2e0e3601e4c7a0ec070b150b4a61a2da672 100644 (file)
@@ -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)