Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for testGetenv (0.63 sec)

  1. src/os/env_test.go

    // license that can be found in the LICENSE file.
    
    package os_test
    
    import (
    	. "os"
    	"reflect"
    	"strings"
    	"testing"
    )
    
    // testGetenv gives us a controlled set of variables for testing Expand.
    func testGetenv(s string) string {
    	switch s {
    	case "*":
    		return "all the args"
    	case "#":
    		return "NARGS"
    	case "$":
    		return "PID"
    	case "1":
    		return "ARGUMENT1"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 04 15:31:54 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/cgo_test.go

    func TestReturnAfterGrow(t *testing.T)       { testReturnAfterGrow(t) }
    func TestReturnAfterGrowFromGo(t *testing.T) { testReturnAfterGrowFromGo(t) }
    func TestSetEnv(t *testing.T)                { testSetEnv(t) }
    func TestThreadLock(t *testing.T)            { testThreadLockFunc(t) }
    func TestUnsignedInt(t *testing.T)           { testUnsignedInt(t) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  3. src/testing/testing_test.go

    		t.Errorf("unexpected %d files in TempDir: %v", len(files), files)
    	}
    
    	glob := filepath.Join(dir, "*.txt")
    	if _, err := filepath.Glob(glob); err != nil {
    		t.Error(err)
    	}
    }
    
    func TestSetenv(t *testing.T) {
    	tests := []struct {
    		name               string
    		key                string
    		initialValueExists bool
    		initialValue       string
    		newValue           string
    	}{
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/test.go

    func duplicateSymbols() {
    	fmt.Printf("%v %v %v\n", C.base_symbol, C.alias_one, C.alias_two)
    }
    
    // environment
    
    // This is really an os package test but here for convenience.
    func testSetEnv(t *testing.T) {
    	if runtime.GOOS == "windows" {
    		// Go uses SetEnvironmentVariable on windows. However,
    		// C runtime takes a *copy* at process startup of the
    		// OS environment, and stores it in environ/envp.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
Back to top