- 新增 dialog_windows.go、dialog_darwin.go、dialog_linux.go - 使用 Go 构建标签实现条件编译 - 修复跨平台编译错误(syscall.NewLazyDLL 在 macOS/Linux 未定义) - 实现 Linux 多工具降级策略(zenity → kdialog → notify-send → xmessage → stderr) - 实现 macOS AppleScript 字符转义 - 更新 messagebox_test.go 构建标签 - 更新 desktop-app spec 新增 Linux 降级策略和 macOS 字符转义规范
20 lines
350 B
Go
20 lines
350 B
Go
//go:build windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestMessageBoxW_WindowsOnly(t *testing.T) {
|
|
messageBox("测试标题", "测试消息", MB_ICONINFORMATION)
|
|
}
|
|
|
|
func TestShowError_WindowsBranch(t *testing.T) {
|
|
showError("测试错误", "这是一条测试错误消息")
|
|
}
|
|
|
|
func TestShowAbout_WindowsBranch(t *testing.T) {
|
|
showAbout()
|
|
}
|