Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestIsAbs (1.34 sec)

  1. src/path/path_test.go

    }
    
    var isAbsTests = []IsAbsTest{
    	{"", false},
    	{"/", true},
    	{"/usr/bin/gcc", true},
    	{"..", false},
    	{"/a/../bb", true},
    	{".", false},
    	{"./", false},
    	{"lala", false},
    }
    
    func TestIsAbs(t *testing.T) {
    	for _, test := range isAbsTests {
    		if r := IsAbs(test.path); r != test.isAbs {
    			t.Errorf("IsAbs(%q) = %v, want %v", test.path, r, test.isAbs)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 13 01:12:09 UTC 2020
    - 4.6K bytes
    - Viewed (0)
  2. src/path/filepath/path_test.go

    	{`c:/a/b`, true},
    	{`\\host\share`, true},
    	{`\\host\share\`, true},
    	{`\\host\share\foo`, true},
    	{`//host/share/foo/bar`, true},
    	{`\\?\a\b\c`, true},
    	{`\??\a\b\c`, true},
    }
    
    func TestIsAbs(t *testing.T) {
    	var tests []IsAbsTest
    	if runtime.GOOS == "windows" {
    		tests = append(tests, winisabstests...)
    		// All non-windows tests should fail, because they have no volume letter.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 47.1K bytes
    - Viewed (0)
Back to top