7437a18188
Previously, we were using `smallestNotIn` for selecting new characters for menu items with duplicate chatacters - this uses the 'Bounded' instance for the type, which for Char meant the first character we would always select was \NUL - making it look like the menu item had no character, and making it impossible to actually select the menu item. This introduces an AlphaChar newtype, which is a wrapper around Char whose Bounded and Enum instances only use alphabetic characters (a-ZA-Z) and uses that for menu characters instead. Change-Id: If34ed9e9ce84f2bcb1cb87432cc6273f40b69f72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3229 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
55 lines
2 KiB
Haskell
55 lines
2 KiB
Haskell
--------------------------------------------------------------------------------
|
|
import Test.Prelude
|
|
--------------------------------------------------------------------------------
|
|
import qualified Xanthous.Data.EntitiesSpec
|
|
import qualified Xanthous.Data.EntityCharSpec
|
|
import qualified Xanthous.Data.EntityMap.GraphicsSpec
|
|
import qualified Xanthous.Data.EntityMapSpec
|
|
import qualified Xanthous.Data.LevelsSpec
|
|
import qualified Xanthous.Data.MemoSpec
|
|
import qualified Xanthous.Data.NestedMapSpec
|
|
import qualified Xanthous.DataSpec
|
|
import qualified Xanthous.Entities.RawsSpec
|
|
import qualified Xanthous.Entities.CharacterSpec
|
|
import qualified Xanthous.GameSpec
|
|
import qualified Xanthous.Game.StateSpec
|
|
import qualified Xanthous.Game.PromptSpec
|
|
import qualified Xanthous.Generators.Level.UtilSpec
|
|
import qualified Xanthous.MessageSpec
|
|
import qualified Xanthous.Messages.TemplateSpec
|
|
import qualified Xanthous.OrphansSpec
|
|
import qualified Xanthous.RandomSpec
|
|
import qualified Xanthous.Util.GraphSpec
|
|
import qualified Xanthous.Util.GraphicsSpec
|
|
import qualified Xanthous.Util.InflectionSpec
|
|
import qualified Xanthous.UtilSpec
|
|
--------------------------------------------------------------------------------
|
|
|
|
main :: IO ()
|
|
main = defaultMain test
|
|
|
|
test :: TestTree
|
|
test = testGroup "Xanthous"
|
|
[ Xanthous.Data.EntitiesSpec.test
|
|
, Xanthous.Data.EntityMap.GraphicsSpec.test
|
|
, Xanthous.Data.EntityMapSpec.test
|
|
, Xanthous.Data.LevelsSpec.test
|
|
, Xanthous.Data.MemoSpec.test
|
|
, Xanthous.Data.NestedMapSpec.test
|
|
, Xanthous.DataSpec.test
|
|
, Xanthous.Entities.RawsSpec.test
|
|
, Xanthous.Entities.CharacterSpec.test
|
|
, Xanthous.GameSpec.test
|
|
, Xanthous.Game.StateSpec.test
|
|
, Xanthous.Game.PromptSpec.test
|
|
, Xanthous.Generators.Level.UtilSpec.test
|
|
, Xanthous.MessageSpec.test
|
|
, Xanthous.Messages.TemplateSpec.test
|
|
, Xanthous.OrphansSpec.test
|
|
, Xanthous.RandomSpec.test
|
|
, Xanthous.Util.GraphSpec.test
|
|
, Xanthous.Util.GraphicsSpec.test
|
|
, Xanthous.Util.InflectionSpec.test
|
|
, Xanthous.UtilSpec.test
|
|
, Xanthous.Data.EntityCharSpec.test
|
|
]
|