diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-14 10:34:02 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-14 11:32:25 +0200 |
commit | 27a524b0905ec73c1eef233f94700feb9f465011 (patch) | |
tree | 54b52fb75ffc867c1eb6f6da441cb186b900e7d2 /commands/commands_test.go | |
parent | bede93de005dcf934f3ec9be6388310ac6c57acd (diff) |
commands: Properly handle CLI slice arguments
Like `--disableKinds` -- this handling was kind of broken when we recently moved this from global vars
See #4607
Diffstat (limited to 'commands/commands_test.go')
-rw-r--r-- | commands/commands_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/commands_test.go b/commands/commands_test.go index 5173e7409..2eefaa2ea 100644 --- a/commands/commands_test.go +++ b/commands/commands_test.go @@ -57,8 +57,10 @@ func TestCommandsPersistentFlags(t *testing.T) { }{{[]string{"server", "--config=myconfig.toml", "--contentDir=mycontent", + "--disableKinds=page,home", "--layoutDir=mylayouts", "--theme=mytheme", + "--gc", "--themesDir=mythemes", "--cleanDestinationDir", "--navigateToChanged", @@ -100,7 +102,10 @@ func TestCommandsPersistentFlags(t *testing.T) { assert.Equal("mytheme", cfg.GetString("theme")) assert.Equal("mythemes", cfg.GetString("themesDir")) + assert.Equal([]string{"page", "home"}, cfg.Get("disableKinds")) + assert.True(cfg.GetBool("uglyURLs")) + assert.True(cfg.GetBool("gc")) // The flag is named i18n-warnings assert.True(cfg.GetBool("logI18nWarnings")) |