mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
19 lines
399 B
Go
19 lines
399 B
Go
//go:build !linux && !darwin && !windows
|
|
|
|
package hardwaretools
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestSerialListPortsUnsupportedPlatform(t *testing.T) {
|
|
_, err := serialListPorts()
|
|
if err == nil {
|
|
t.Fatal("expected unsupported platform error")
|
|
}
|
|
if !strings.Contains(err.Error(), "not supported") {
|
|
t.Fatalf("serialListPorts() error = %v, want unsupported platform message", err)
|
|
}
|
|
}
|