diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-29 22:34:47 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-29 22:34:47 +0200 |
| commit | 42fb6efd01e3640ea9d15dc1e0a072c1ea8295b1 (patch) | |
| tree | ebf351b66f0288c8e9f879c529a962b025bebf15 /runner/create_test.go | |
| parent | 03a31799a872385d821130f46942fc13dae76774 (diff) | |
fix very embarrassing bug where -a didnt actually work
Diffstat (limited to 'runner/create_test.go')
| -rw-r--r-- | runner/create_test.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/runner/create_test.go b/runner/create_test.go new file mode 100644 index 0000000..fc9e535 --- /dev/null +++ b/runner/create_test.go @@ -0,0 +1,34 @@ +//go:build test + +package runner + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestAssertSourceIs_Correct(t *testing.T) { + src := TSource("abc", "def") + AssertSourceIs(t, "abc", src) +} + +func TestAssertSourceIs_Wrong(t *testing.T) { + src := TSource("abc", "def") + AssertSourceIsNot(t, ";lkjh", src) +} + +func TestAssertTargetIs_Correct(t *testing.T) { + ta := TTarget("aaaa") + AssertTargetIs(t, "aaaa", ta) +} + +func TestAssertTargetIs_Wrong(t *testing.T) { + ta := TTarget("aaaa") + AssertTargetIsNot(t, "bbbbbb", ta) +} + +func TestTTargetIdentity(t *testing.T) { + ta := TTarget("asdf.hidden.sh") + assert.True(t, ta.Matches("asdf")) + assert.False(t, ta.Matches("hidden")) +} |
