pad menu selections to same width

This commit is contained in:
Jonathan Lamothe
2020-01-22 21:10:21 -05:00
parent 72b6f05700
commit d6ae171dc8
2 changed files with 14 additions and 6 deletions

View File

@@ -37,11 +37,11 @@ showSpec :: Spec
showSpec = describe "show" $
it "should display correctly" $ let
menu = Menu "Foo" ()
[ MenuItem '1' "Item 1" $ return ()
, MenuItem '2' "Item 2" $ return ()
[ MenuItem '1' "foo" $ return ()
, MenuItem '2' "bar baz" $ return ()
]
expected =
"Foo\n\n\
\1: Item 1\n\
\2: Item 2\n"
\1: foo \n\
\2: bar baz\n"
in show menu `shouldBe` expected