...

Source file src/os/exec/internal/fdtest/exists_test.go

Documentation: os/exec/internal/fdtest

     1  // Copyright 2021 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package fdtest
     6  
     7  import (
     8  	"os"
     9  	"runtime"
    10  	"testing"
    11  )
    12  
    13  func TestExists(t *testing.T) {
    14  	if runtime.GOOS == "windows" {
    15  		t.Skip("Exists not implemented for windows")
    16  	}
    17  
    18  	if !Exists(os.Stdout.Fd()) {
    19  		t.Errorf("Exists(%d) got false want true", os.Stdout.Fd())
    20  	}
    21  }
    22  

View as plain text