summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-12-07 23:36:51 +0100
committerPetr Štetiar <ynezz@true.cz>2019-12-07 23:40:02 +0100
commit750b046eb77f04f82389a8af089a4945ca2d378f (patch)
tree288d360292e4e17a67e8eeb40b86fba2ae1169d8
parent654d7c33da28d492412e1a0fe4463f27d362e9b9 (diff)
downloaduci-750b046eb77f04f82389a8af089a4945ca2d378f.tar.gz
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>
-rw-r--r--tests/cram/config/broken1
-rw-r--r--tests/cram/lua/basic.lua2
-rw-r--r--tests/cram/test_ucilua.t1
3 files changed, 4 insertions, 0 deletions
diff --git a/tests/cram/config/broken b/tests/cram/config/broken
new file mode 100644
index 0000000..d2ecc01
--- /dev/null
+++ b/tests/cram/config/broken
@@ -0,0 +1 @@
+config alias' 'a'
diff --git a/tests/cram/lua/basic.lua b/tests/cram/lua/basic.lua
index ceb706f..f005264 100644
--- a/tests/cram/lua/basic.lua
+++ b/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"))
diff --git a/tests/cram/test_ucilua.t b/tests/cram/test_ucilua.t
index 1544e23..cfe1f2e 100644
--- a/tests/cram/test_ucilua.t
+++ b/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)