Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for initMimeForTests (0.14 sec)

  1. src/mime/type_plan9.go

    	osInitMime = initMimePlan9
    }
    
    func initMimePlan9() {
    	for _, filename := range typeFiles {
    		loadMimeFile(filename)
    	}
    }
    
    var typeFiles = []string{
    	"/sys/lib/mimetype",
    }
    
    func initMimeForTests() map[string]string {
    	typeFiles = []string{"testdata/test.types.plan9"}
    	return map[string]string{
    		".t1":  "application/test",
    		".t2":  "text/test; charset=utf-8",
    		".pNg": "image/png",
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 15 19:56:08 UTC 2016
    - 1K bytes
    - Viewed (0)
  2. src/mime/type_windows.go

    		// handle it here by ignoring that registry setting.
    		if name == ".js" && (v == "text/plain" || v == "text/plain; charset=utf-8") {
    			continue
    		}
    
    		setExtensionType(name, v)
    	}
    }
    
    func initMimeForTests() map[string]string {
    	return map[string]string{
    		".PnG": "image/png",
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 28 20:07:28 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  3. src/mime/type_test.go

    	once = sync.Once{}
    	// initMimeForTests returns the platform-specific extension =>
    	// type tests. On Unix and Plan 9, this also tests the parsing
    	// of MIME text files (in testdata/*). On Windows, we test the
    	// real registry on the machine and assume that ".png" exists
    	// there, which empirically it always has, for all versions of
    	// Windows.
    	typeTests := initMimeForTests()
    
    	for ext, want := range typeTests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 08 21:09:03 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  4. src/mime/type_unix.go

    		}
    	}
    
    	// Fallback if no system-generated mimetype database exists.
    	for _, filename := range typeFiles {
    		loadMimeFile(filename)
    	}
    }
    
    func initMimeForTests() map[string]string {
    	mimeGlobs = []string{""}
    	typeFiles = []string{"testdata/test.types"}
    	return map[string]string{
    		".T1":  "application/test",
    		".t2":  "text/test; charset=utf-8",
    		".png": "image/png",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:56:32 UTC 2023
    - 3K bytes
    - Viewed (0)
Back to top