Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

521 B
Raw Blame
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)
			}
		})
	}
}