Add test case for comments lines in config
This commit is contained in:
parent
98a35831f0
commit
a376658386
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,10 @@ func TestParseConfig(t *testing.T) {
|
||||||
input: "version_prefix=v\ngit_sign=t\n",
|
input: "version_prefix=v\ngit_sign=t\n",
|
||||||
expect: config{versionPrefix: "v", sign: true},
|
expect: config{versionPrefix: "v", sign: true},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
input: "# My config\nversion_prefix=v\ngit_sign=t\n",
|
||||||
|
expect: config{versionPrefix: "v", sign: true},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
input: "VERSION_PREFIX=v\nGIT_SIGN=false\n",
|
input: "VERSION_PREFIX=v\nGIT_SIGN=false\n",
|
||||||
expect: config{versionPrefix: "v", sign: false},
|
expect: config{versionPrefix: "v", sign: false},
|
||||||
|
|
Loading…
Reference in a new issue