- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestExists (0.65 sec)
-
src/os/exec/internal/fdtest/exists_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fdtest import ( "os" "runtime" "testing" ) func TestExists(t *testing.T) { if runtime.GOOS == "windows" { t.Skip("Exists not implemented for windows") } if !Exists(os.Stdout.Fd()) { t.Errorf("Exists(%d) got false want true", os.Stdout.Fd()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 16 19:41:37 UTC 2021 - 427 bytes - Viewed (0) -
pkg/file/file_test.go
assert.NoError(t, err) f, err := os.Open(file) if err != nil { t.Fatal(err) } body, err := io.ReadAll(f) if err != nil { t.Fatal(err) } assert.Equal(t, body, data) } func TestExists(t *testing.T) { d := t.TempDir() exist := Exists(d) assert.Equal(t, exist, true) unExist := Exists("unExist") assert.Equal(t, unExist, false)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 11 19:10:54 UTC 2023 - 1.9K bytes - Viewed (0)