(t *testing.T)
| 644 | } |
| 645 | |
| 646 | func TestBuildOnlyFileMultipleFlags(t *testing.T) { |
| 647 | c := &BuildCommand{ |
| 648 | Meta: TestMetaFile(t), |
| 649 | } |
| 650 | |
| 651 | args := []string{ |
| 652 | "-parallel-builds=1", |
| 653 | "-only=chocolate", |
| 654 | "-only=cherry", |
| 655 | "-only=apple", // ignored |
| 656 | "-only=peach", // ignored |
| 657 | "-only=pear", // ignored |
| 658 | filepath.Join(testFixture("build-only"), "template.json"), |
| 659 | } |
| 660 | |
| 661 | defer cleanup() |
| 662 | |
| 663 | if code := c.Run(args); code != 0 { |
| 664 | fatalCommand(t, c.Meta) |
| 665 | } |
| 666 | |
| 667 | for _, f := range []string{"vanilla.txt", "tomato.txt"} { |
| 668 | if fileExists(f) { |
| 669 | t.Errorf("Expected NOT to find %s", f) |
| 670 | } |
| 671 | } |
| 672 | for _, f := range []string{"chocolate.txt", "cherry.txt", |
| 673 | "apple.txt", "peach.txt", "pear.txt", "unnamed.txt"} { |
| 674 | if !fileExists(f) { |
| 675 | t.Errorf("Expected to find %s", f) |
| 676 | } |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | func TestBuildProvisionAndPosProcessWithBuildVariablesSharing(t *testing.T) { |
| 681 | c := &BuildCommand{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…