Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for testIsDir (0.24 sec)

  1. src/os/stat_test.go

    	params.lstatCheck(t, path, lsfi2)
    
    	if !os.SameFile(lsfi, lsfi2) {
    		t.Errorf("lstat of %q file in %q directory and %q should be the same", lsfi2.Name(), parentdir, path)
    	}
    }
    
    // testIsDir verifies that fi refers to directory.
    func testIsDir(t *testing.T, path string, fi fs.FileInfo) {
    	t.Helper()
    	if !fi.IsDir() {
    		t.Errorf("%q should be a directory", path)
    	}
    	if fi.Mode()&fs.ModeSymlink != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:38:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/fsys/fsys_test.go

    		t.Fatal("parsing overlay JSON:", err)
    	}
    
    	if err := initFromJSON(overlayJSON); err != nil {
    		t.Fatal(err)
    	}
    	t.Cleanup(func() { overlay = nil })
    }
    
    func TestIsDir(t *testing.T) {
    	initOverlay(t, `
    {
    	"Replace": {
    		"subdir2/file2.txt":  "overlayfiles/subdir2_file2.txt",
    		"subdir4":            "overlayfiles/subdir4",
    		"subdir3/file3b.txt": "overlayfiles/subdir3_file3b.txt",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:52:11 UTC 2023
    - 29.1K bytes
    - Viewed (0)
  3. src/path/filepath/path_windows_test.go

    		} else if got != test.want {
    			t.Errorf("toNorm(%s) returns %s, but %s expected\n", test.arg, got, test.want)
    		}
    	}
    
    	testPath := `{{tmp}}\test\foo\bar`
    
    	testsDir := []struct {
    		wd   string
    		arg  string
    		want string
    	}{
    		// test absolute paths
    		{".", `{{tmp}}\test\foo\bar`, `{{tmp}}\test\foo\bar`},
    		{".", `{{tmp}}\.\test/foo\bar`, `{{tmp}}\test\foo\bar`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 20:38:54 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top