From 1b7faaf661b3dbbd55d781e9652b315a35298f91 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 13 Feb 2021 11:51:25 +0200 Subject: [PATCH] Add couple more config tests --- test/test_cnf.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_cnf.lua b/test/test_cnf.lua index a177443ac..5970e1c66 100644 --- a/test/test_cnf.lua +++ b/test/test_cnf.lua @@ -11,6 +11,9 @@ local configtests = { { test = "OPTIONS=!color\nOPTIONS=color", result = { { line = 2, error = "boolean option specified multiple times: color" } } }, + { test = "OPTIONS=!color,color", + result = { { line = 1, error = "boolean option specified multiple times: color" } } + }, { test = "OPTIONS=runmode:crawl", result = { }, extra = function() return nh.get_config("runmode") == "crawl" end @@ -25,6 +28,12 @@ local configtests = { result = { }, extra = function() return nh.get_config("runmode") == "teleport" end }, + { test = "OPTIONS=runmode:crawl\nOPTIONS=runmode:teleport", + result = { { line = 2, error = "compound option specified multiple times: runmode" } } + }, + { test = "OPTIONS=runmode:run,runmode:walk", + result = { { line = 1, error = "compound option specified multiple times: runmode" } } + }, };