test building with `-except=""`

This commit is contained in:
Adrien Delorme 2019-02-19 15:25:41 +01:00
parent 560b15de00
commit b04b8b3857
1 changed files with 24 additions and 0 deletions

View File

@ -102,6 +102,30 @@ func TestBuildOnlyFileMultipleFlags(t *testing.T) {
}
}
func TestBuildEverything(t *testing.T) {
c := &BuildCommand{
Meta: testMetaFile(t),
}
args := []string{
`-except=""`,
filepath.Join(testFixture("build-only"), "template.json"),
}
defer cleanup()
if code := c.Run(args); code != 0 {
fatalCommand(t, c.Meta)
}
for _, f := range []string{"chocolate.txt", "vanilla.txt", "tomato.txt",
"apple.txt", "cherry.txt", "pear.txt", "peach.txt"} {
if !fileExists(f) {
t.Errorf("Expected to find %s", f)
}
}
}
func TestBuildExceptFileCommaFlags(t *testing.T) {
c := &BuildCommand{
Meta: testMetaFile(t),