(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestQuerySystemEnvironmentVariable(t *testing.T) { |
| 20 | // 测试查询系统级别的环境变量 |
| 21 | key := "PATH" |
| 22 | value, err := QuerySystemEnvironmentVariable(key) |
| 23 | if err != nil { |
| 24 | t.Fatalf("QuerySystemEnvironmentVariable failed: %v", err) |
| 25 | } |
| 26 | if value == "" { |
| 27 | t.Errorf("Expected non-empty value for key %s, got empty string", key) |
| 28 | } |
| 29 | } |
nothing calls this directly
no test coverage detected