some fixes
All checks were successful
go-test / go test (push) Successful in 26s
Release / Build & publish (push) Successful in 59s

This commit is contained in:
2026-06-10 09:55:25 +03:00
parent cbc000e872
commit 1ef3973a15
7 changed files with 246 additions and 0 deletions

View File

@@ -37,6 +37,38 @@ group("g") {
}
}
func TestParsePatternStageAllMode(t *testing.T) {
src := `
build "make"
group("g") {
weight = 1.0
pattern {
dirs = "testdata/test_*"
stage = true
args_file = "args.txt"
output = "answer.txt"
}
}
`
f, _, err := Parse(src)
if err != nil {
t.Fatalf("parse: %v", err)
}
pat := f.Groups[0].Pattern
if pat == nil {
t.Fatal("no pattern")
}
if !pat.StageAll {
t.Error("StageAll = false, want true")
}
if pat.ArgsFile != "args.txt" {
t.Errorf("ArgsFile = %q", pat.ArgsFile)
}
if pat.OutputFile != "answer.txt" {
t.Errorf("OutputFile = %q", pat.OutputFile)
}
}
func TestParsePatternUnknownField(t *testing.T) {
src := `
build "make"