TestIsLinux tests IsLinux function
(t *testing.T)
| 199 | |
| 200 | // TestIsLinux tests IsLinux function |
| 201 | func TestIsLinux(t *testing.T) { |
| 202 | result := nodeps.IsLinux() |
| 203 | require.IsType(t, false, result) |
| 204 | |
| 205 | if runtime.GOOS == "linux" { |
| 206 | require.True(t, result, "Should be true on Linux") |
| 207 | } else { |
| 208 | require.False(t, result, "Should be false on non-Linux platforms") |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | // TestIsWSL2 tests IsWSL2 function |
| 213 | func TestIsWSL2(t *testing.T) { |