Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for Cwd (0.18 sec)

  1. src/os/path_windows_test.go

    		{`\long\..\foo.txt`, `\\?\C:\foo.txt`},
    
    		// Relative
    		{`long\foo.txt`, `\\?\C:\cwd\long\foo.txt`},
    		{`long/foo.txt`, `\\?\C:\cwd\long\foo.txt`},
    		{`long///foo.txt`, `\\?\C:\cwd\long\foo.txt`},
    		{`long\.\foo.txt`, `\\?\C:\cwd\long\foo.txt`},
    		{`long\..\foo.txt`, `\\?\C:\cwd\foo.txt`},
    		{`.\long\foo.txt`, `\\?\C:\cwd\long\foo.txt`},
    
    		// UNC Absolute
    		{`\\srv\share\long`, `\\?\UNC\srv\share\long`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:37:32 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/base/path.go

    	}
    	return wd
    }
    
    // Cwd returns the current working directory at the time of the first call.
    func Cwd() string {
    	cwdOnce.Do(func() {
    		cwd = UncachedCwd()
    	})
    	return cwd
    }
    
    // ShortPath returns an absolute or relative name for path, whatever is shorter.
    func ShortPath(path string) string {
    	if rel, err := filepath.Rel(Cwd(), path); err == nil && len(rel) < len(path) {
    		return rel
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 19:17:27 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. src/cmd/go/internal/load/search.go

    package load
    
    import (
    	"path/filepath"
    	"strings"
    
    	"cmd/go/internal/search"
    	"cmd/internal/pkgpattern"
    )
    
    // MatchPackage(pattern, cwd)(p) reports whether package p matches pattern in the working directory cwd.
    func MatchPackage(pattern, cwd string) func(*Package) bool {
    	switch {
    	case search.IsRelativePath(pattern):
    		// Split pattern into leading pattern-free directory path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 16:43:40 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  4. src/runtime/testdata/testprog/lockosthread.go

    		println("failed to chdir:", err.Error())
    		os.Exit(1)
    	}
    	// On systems other than Linux, cwd == "".
    	cwd, err := getcwd()
    	if err != nil {
    		println("failed to get cwd:", err.Error())
    		os.Exit(1)
    	}
    	if cwd != "" && cwd != "/" {
    		println("unexpected cwd", cwd, " wanted /")
    		os.Exit(1)
    	}
    
    	ready := make(chan bool, 1)
    	go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:00:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_testing_databases.py

    from ...utils import needs_pydanticv1
    
    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 788 bytes
    - Viewed (0)
  6. src/os/exec/exec_posix_test.go

    func TestImplicitPWD(t *testing.T) {
    	t.Parallel()
    
    	cwd, err := os.Getwd()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	cases := []struct {
    		name string
    		dir  string
    		want string
    	}{
    		{"empty", "", cwd},
    		{"dot", ".", cwd},
    		{"dotdot", "..", filepath.Dir(cwd)},
    		{"PWD", cwd, cwd},
    		{"PWDdotdot", cwd + string(filepath.Separator) + "..", filepath.Dir(cwd)},
    	}
    
    	for _, tc := range cases {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 20:21:32 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 822 bytes
    - Viewed (0)
  8. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/inputs/process/instrument/Execute3QualifiedStaticInstrumentationInDynamicGroovyWithoutIndyIntegrationTest.groovy

    package org.gradle.internal.cc.impl.inputs.process.instrument
    
    /**
     * Test cases for triple-argument {@code ProcessGroovyMethods.execute}:
     * <pre>
     *     ProcessGroovyMethod.execute("echo 123", env, cwd)
     *     ProcessGroovyMethod.execute(["echo", "123"]", env, cwd)
     * </pre>
     */
    class Execute3QualifiedStaticInstrumentationInDynamicGroovyWithoutIndyIntegrationTest extends Execute3QualifiedStaticInstrumentationInDynamicGroovyWithIndyIntegrationTest {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  9. src/net/http/cgi/host_test.go

    	}
    }
    
    func TestDir(t *testing.T) {
    	testenv.MustHaveExec(t)
    	cwd, _ := os.Getwd()
    	h := &Handler{
    		Path: os.Args[0],
    		Root: "/test.cgi",
    		Dir:  cwd,
    	}
    	expectedMap := map[string]string{
    		"cwd": cwd,
    	}
    	runCgiTest(t, h, "GET /test.cgi HTTP/1.0\nHost: example.com\n\n", expectedMap)
    
    	cwd, _ = os.Getwd()
    	cwd, _ = filepath.Split(os.Args[0])
    	h = &Handler{
    		Path: os.Args[0],
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 18:29:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. src/cmd/go/internal/load/flag.go

    }
    
    // Set is called each time the flag is encountered on the command line.
    func (f *PerPackageFlag) Set(v string) error {
    	return f.set(v, base.Cwd())
    }
    
    // set is the implementation of Set, taking a cwd (current working directory) for easier testing.
    func (f *PerPackageFlag) set(v, cwd string) error {
    	f.raw = v
    	f.present = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:20:43 UTC 2022
    - 2.6K bytes
    - Viewed (0)
Back to top