Skip to content

Commit 203b988

Browse files
authored
make clear that play command accept both GME and YAML file (#235)
* make clear that play command accept both GME and YAML file * make succeed the tests on the global help with the new help text of the play command * make succeed the tests on play command's help * make succeed all the tests on play command's help
1 parent 7020cde commit 203b988

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/tttool.hs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,15 @@ playCmd :: Mod CommandFields (Conf -> IO ())
318318
playCmd =
319319
command "play" $
320320
info parser $
321-
progDesc "interactively play a GME file"
321+
progDesc "interactively play a GME or YAML file"
322322
where
323-
parser = flip play <$> gmeFileParser
323+
parser = flip play <$> gmeOrYamlFileParser
324+
325+
gmeOrYamlFileParser :: Parser FilePath
326+
gmeOrYamlFileParser = strArgument $ mconcat
327+
[ metavar "FILE"
328+
, help "GME or YAML file to read"
329+
]
324330

325331

326332
rewriteCmd :: Mod CommandFields (Conf -> IO ())

testsuite/expected/help-play.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Usage: tttool play GME
2-
interactively play a GME file
1+
Usage: tttool play FILE
2+
interactively play a GME or YAML file
33

44
Available options:
5-
GME GME file to read
5+
FILE GME or YAML file to read
66
-h,--help Show this help text

testsuite/expected/help.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ GME extraction commands:
4747
binaries dumps all binaries
4848

4949
Simulation commands:
50-
play interactively play a GME file
50+
play interactively play a GME or YAML file
5151

5252
Please run "tttool COMMAND --help" for information on the particular command.

0 commit comments

Comments
 (0)