Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -937,3 +937,24 @@ func TestVarInheritance(t *testing.T) {
)
}
}

func TestFuzzyModel(t *testing.T) {
t.Parallel()

NewExecutorTest(t,
WithName("fuzzy"),
WithExecutorOptions(
task.WithDir("testdata/fuzzy"),
),
WithTask("instal"),
WithRunError(),
)

NewExecutorTest(t,
WithName("not-fuzzy"),
WithExecutorOptions(
task.WithDir("testdata/fuzzy"),
),
WithTask("install"),
)
}
2 changes: 1 addition & 1 deletion setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (e *Executor) readTaskfile(node taskfile.Node) error {
}

func (e *Executor) setupFuzzyModel() {
if e.Taskfile != nil {
if e.Taskfile == nil {
return
}

Expand Down
4 changes: 4 additions & 0 deletions testdata/fuzzy/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 3

tasks:
install: echo 'install'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
task: Task "instal" does not exist. Did you mean "install"?
1 change: 1 addition & 0 deletions testdata/fuzzy/testdata/TestFuzzyModel-fuzzy.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
task: No tasks with description available. Try --list-all to list all tasks
2 changes: 2 additions & 0 deletions testdata/fuzzy/testdata/TestFuzzyModel-not-fuzzy.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
task: [install] echo 'install'
install
Loading