feat(dev): add Docker development CLI (#6495)
This commit is contained in:
1 parent
d58a47b776
commit
018f84f80d
27 files changed
+4048
-7
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package platform
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestOpenCommand(t *testing.T) {
|
||||
tests := []struct {
|
||||
goos string
|
||||
name string
|
||||
}{
|
||||
{goos: "darwin", name: "open"},
|
||||
{goos: "linux", name: "xdg-open"},
|
||||
{goos: "windows", name: "rundll32"},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.goos, func(t *testing.T) {
|
||||
name, args, err := openCommand(test.goos, "https://example.com")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if name != test.name || len(args) == 0 {
|
||||
t.Fatalf("command = %s %v", name, args)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user