blob: 4f56191b0126dfae19a9601532c619e775d2ef1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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": "",
"asdf": "",
}
for k, v := range inputs {
sh := s.ShellByFilename(k)
assert.Equal(t, sh, v)
}
}
|