diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-14 16:37:17 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-14 16:37:17 +0200 |
| commit | 45a297a8e526094e8fce6e2c5c0fd89b381d1765 (patch) | |
| tree | 852ebc3a0112c94dc9726d0b27ab057bf6383660 /runner/shell/shell_test.go | |
i have to commit at some point!
Diffstat (limited to 'runner/shell/shell_test.go')
| -rw-r--r-- | runner/shell/shell_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runner/shell/shell_test.go b/runner/shell/shell_test.go new file mode 100644 index 0000000..b28bd6c --- /dev/null +++ b/runner/shell/shell_test.go @@ -0,0 +1,22 @@ +package shell + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestShell_ShellByFilename(t *testing.T) { + s := &shell{ + Locations: map[string]string{"powershell": "/pws", "bash": "/bash"}, + } + inputs := map[string]string{ + "script.ps1": "/pws", + "script.sh": "/bash", + "asdf": "", + } + + for k, v := range inputs { + sh := s.ShellByFilename(k) + assert.Equal(t, sh, v) + } +} |
