mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
fix: tests
This commit is contained in:
committed by
Andrey Nering
parent
90a56df621
commit
fa82051a06
@@ -7,6 +7,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
@@ -1421,7 +1422,7 @@ func TestDisplaysErrorOnVersion1Schema(t *testing.T) {
|
|||||||
}
|
}
|
||||||
err := e.Setup()
|
err := e.Setup()
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
assert.Equal(t, "task: Taskfile schemas prior to v3 are no longer supported", err.Error())
|
assert.Regexp(t, regexp.MustCompile(`task: Invalid schema version in Taskfile \".*testdata\/version\/v1\/Taskfile\.yml\":\nSchema version \(1\.0\.0\) no longer supported\. Please use v3 or above`), err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDisplaysErrorOnVersion2Schema(t *testing.T) {
|
func TestDisplaysErrorOnVersion2Schema(t *testing.T) {
|
||||||
@@ -1433,7 +1434,7 @@ func TestDisplaysErrorOnVersion2Schema(t *testing.T) {
|
|||||||
}
|
}
|
||||||
err := e.Setup()
|
err := e.Setup()
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
assert.Equal(t, "task: Taskfile schemas prior to v3 are no longer supported", err.Error())
|
assert.Regexp(t, regexp.MustCompile(`task: Invalid schema version in Taskfile \".*testdata\/version\/v2\/Taskfile\.yml\":\nSchema version \(2\.0\.0\) no longer supported\. Please use v3 or above`), err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestShortTaskNotation(t *testing.T) {
|
func TestShortTaskNotation(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user