Add tests for only and except of post-processors

This commit is contained in:
James G. Kim 2015-06-05 12:26:33 +09:00
parent a5818b158f
commit d7c77895dc
3 changed files with 50 additions and 0 deletions

View File

@ -174,6 +174,40 @@ func TestParse(t *testing.T) {
false,
},
{
"parse-pp-only.json",
&Template{
PostProcessors: [][]*PostProcessor{
[]*PostProcessor{
&PostProcessor{
Type: "foo",
OnlyExcept: OnlyExcept{
Only: []string{"bar"},
},
},
},
},
},
false,
},
{
"parse-pp-except.json",
&Template{
PostProcessors: [][]*PostProcessor{
[]*PostProcessor{
&PostProcessor{
Type: "foo",
OnlyExcept: OnlyExcept{
Except: []string{"bar"},
},
},
},
},
},
false,
},
{
"parse-pp-string.json",
&Template{

View File

@ -0,0 +1,8 @@
{
"post-processors": [
{
"type": "foo",
"except": ["bar"]
}
]
}

View File

@ -0,0 +1,8 @@
{
"post-processors": [
{
"type": "foo",
"only": ["bar"]
}
]
}