diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-12 00:44:17 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-12 00:44:17 -0500 |
commit | d3dc88fe6bae0371c3e314cfc6db4ca8a06a4ab6 (patch) | |
tree | 58d1096e81c9b7dd01a7b3fc7f3583ea85194ab7 /src/test.cpp | |
parent | b0c4fd6d3f1c8e44896358ee9b0af20e9b304944 (diff) | |
download | minetest-d3dc88fe6bae0371c3e314cfc6db4ca8a06a4ab6.tar.gz minetest-d3dc88fe6bae0371c3e314cfc6db4ca8a06a4ab6.tar.bz2 minetest-d3dc88fe6bae0371c3e314cfc6db4ca8a06a4ab6.zip |
Settings: Fail on invalid sequence and throw exception for LuaSettings
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test.cpp b/src/test.cpp index e0e17bed4..072bda8ef 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -531,9 +531,12 @@ struct TestSettings: public TestBase group2->setS16("num_oranges", 53); group2->setGroup("animals", group3); group2->set("animals", "cute"); //destroys group 3 + s.setGroup("groupy_thing", group2); - // the bad chars in here should be stripped - s.setGroup("groupy \"_\" thing", group2); + // Test set failure conditions + UASSERT(s.set("Zoop = Poop\nsome_other_setting", "false") == false); + UASSERT(s.set("sneaky", "\"\"\"\njabberwocky = false") == false); + UASSERT(s.set("hehe", "asdfasdf\n\"\"\"\nsomething = false") == false); // Test multiline settings UASSERT(group->get("ccc") == "testy\n testa "); |