- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 200 for ChDir (0.09 sec)
-
src/cmd/go/testdata/script/test_cache_inputs.txt
stdout '\(cached\)' # Files should be tracked even if the test changes its working directory. go test testcache -run=Chdir go test testcache -run=Chdir stdout '\(cached\)' cp 6x.txt testcache/file.txt go test testcache -run=Chdir ! stdout '\(cached\)' go test testcache -run=Chdir stdout '\(cached\)' # The content of files should affect caching, provided that the mtime also changes.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 09 22:23:53 UTC 2024 - 6.3K bytes - Viewed (0) -
src/runtime/testdata/testprog/lockosthread.go
println("unshare not permitted") os.Exit(0) } println("failed to unshare fs:", err.Error()) os.Exit(1) } // Chdir to somewhere else on this thread. // On systems other than Linux, this is a no-op. if err := chdir(os.TempDir()); err != nil { println("failed to chdir:", err.Error()) os.Exit(1) } // The state on this thread is now considered "tainted", but it
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 6.6K bytes - Viewed (0) -
src/os/removeall_test.go
} defer RemoveAll(tempDir) err = Chdir(tempDir) if err != nil { t.Fatalf("Could not chdir to tempdir: %s", err) } err = RemoveAll(".") if err == nil { t.Errorf("RemoveAll succeed to remove .") } err = Chdir(prevDir) if err != nil { t.Fatalf("Could not chdir %s: %s", prevDir, err) } } func TestRemoveAllDotDot(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:21:29 UTC 2024 - 12.3K bytes - Viewed (0) -
cmd/gotemplate/gotemplate_test.go
for fileName, fileContent := range tt.files { err := os.WriteFile(path.Join(tmp, fileName), []byte(fileContent), 0666) require.NoError(t, err, "create input file") } defer os.Chdir(cwd) require.NoError(t, os.Chdir(tmp), "change into tmp directory") in := strings.NewReader(tt.in) var out bytes.Buffer err := generate(in, &out, tt.data) if tt.expectedErr == "" { require.NoError(t, err, "expand template")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jan 22 13:43:42 UTC 2024 - 2.7K bytes - Viewed (0) -
cmd/kubeadm/app/util/chroot_unix.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 24 19:47:49 UTC 2021 - 1.1K bytes - Viewed (0) -
src/os/error_test.go
} if s := checkErrorPredicate("os.IsNotExist", os.IsNotExist, err, fs.ErrNotExist); s != "" { return s } err = os.Chdir(name) if err == nil { if err := os.Chdir(originalWD); err != nil { t.Fatalf("Chdir should have failed, failed to restore original working directory: %v", err) } return "Chdir should have failed, restored original working directory" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 00:41:52 UTC 2023 - 4.9K bytes - Viewed (0) -
src/path/filepath/path_test.go
} return err } return nil } // chdir changes the current working directory to the named directory, // and then restore the original working directory at the end of the test. func chdir(t *testing.T, dir string) { olddir, err := os.Getwd() if err != nil { t.Fatalf("getwd %s: %v", dir, err) } if err := os.Chdir(dir); err != nil { t.Fatalf("chdir %s: %v", dir, err) } t.Cleanup(func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:38:19 UTC 2024 - 47.1K bytes - Viewed (0) -
src/runtime/testdata/testprog/syscalls_linux.go
} func unshareFs() error { err := syscall.Unshare(syscall.CLONE_FS) if testenv.SyscallIsNotSupported(err) { return errNotPermitted } return err } func chdir(path string) error { return syscall.Chdir(path)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 2.2K bytes - Viewed (0) -
src/os/executable_test.go
} return os.SameFile(fi1, fi2) } func init() { if e := os.Getenv(executable_EnvVar); e != "" { // first chdir to another path dir := "/" if runtime.GOOS == "windows" { cwd, err := os.Getwd() if err != nil { panic(err) } dir = filepath.VolumeName(cwd) } os.Chdir(dir) if ep, err := os.Executable(); err != nil { fmt.Fprint(os.Stderr, "ERROR: ", err) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 3.4K bytes - Viewed (0) -
src/cmd/pack/pack_test.go
ar.a.File().Close() // Now extract one file. We chdir to the directory of the archive for simplicity. pwd, err := os.Getwd() if err != nil { t.Fatal("os.Getwd: ", err) } err = os.Chdir(dir) if err != nil { t.Fatal("os.Chdir: ", err) } defer func() { err := os.Chdir(pwd) if err != nil { t.Fatal("os.Chdir: ", err) } }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 16:27:35 UTC 2023 - 12.5K bytes - Viewed (0)