From cfc1db17257328038d82e84db2452e5d5c634cc1 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 27 Apr 2014 23:33:30 -0700 Subject: [PATCH] cli: more tests for add-on options pass-through --- tests/command-line.test | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/command-line.test b/tests/command-line.test index 7feb75602..3a412bfd4 100644 --- a/tests/command-line.test +++ b/tests/command-line.test @@ -131,8 +131,20 @@ hledgerdev register -f/dev/null --alias=somealiases --rules-file -? -h --help -- >>> /^register \[OPTIONS\]/ >>>=0 -# 14. flags after and add-command are handled by the add-on -# needs updating -#hledgerdev accountnames.hs --help -#>>> /^assets$/ -#>>>=0 +# do "make addons" to set up for these: + +# 14. flags after an add-command are handled by the add-on +hledgerdev addon --help +>>> /args: --help/ +>>>=0 + +# 15. add-on flags which are not also defined in the main executable are a problem +hledgerdev addon --addonflag +>>>2 /Unknown flag: --addonflag/ +>>>=1 + +# 16. hledger main executable ignores anything after -- (and hides the -- from the add-on) +hledgerdev addon --help -- --addonflag +>>> /args: --help --addonflag/ +>>>=0 +