]> granicus.if.org Git - nethack/commitdiff
Add couple more config tests
authorPasi Kallinen <paxed@alt.org>
Sat, 13 Feb 2021 09:51:25 +0000 (11:51 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 13 Feb 2021 09:51:25 +0000 (11:51 +0200)
test/test_cnf.lua

index a177443ac95c1d377005d1bf4e434be3aacdf6f2..5970e1c66d2d0d2d55c3a1dce5de7180dc6254fb 100644 (file)
@@ -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" } }
+   },
 };