summaryrefslogtreecommitdiff
path: root/internal/cli/run_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/run_test.go')
-rw-r--r--internal/cli/run_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/cli/run_test.go b/internal/cli/run_test.go
new file mode 100644
index 0000000..705fe29
--- /dev/null
+++ b/internal/cli/run_test.go
@@ -0,0 +1,18 @@
+package cli
+
+import (
+ "strings"
+ "testing"
+)
+
+func TestRunTasks_InvalidParallel(t *testing.T) {
+ for _, parallel := range []int{0, -1, -100} {
+ err := runTasks("ignored.yaml", parallel, false)
+ if err == nil {
+ t.Fatalf("parallel=%d: expected error, got nil", parallel)
+ }
+ if !strings.Contains(err.Error(), "--parallel") {
+ t.Errorf("parallel=%d: error should mention --parallel flag, got: %v", parallel, err)
+ }
+ }
+}