From: Pasi Kallinen Date: Sat, 13 Feb 2021 09:51:25 +0000 (+0200) Subject: Add couple more config tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b7faaf661b3dbbd55d781e9652b315a35298f91;p=nethack Add couple more config tests --- 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" } } + }, };