Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestAtomicWrite (0.12 sec)

  1. pkg/file/file_test.go

    	assert.Equal(t, body, []byte("hello world"))
    }
    
    func TestCopy(t *testing.T) {
    	copyTest(t, Copy)
    }
    
    func TestAtomicCopy(t *testing.T) {
    	copyTest(t, AtomicCopy)
    }
    
    func TestAtomicWrite(t *testing.T) {
    	d := t.TempDir()
    	file := filepath.Join(d, "test")
    	data := []byte("hello world")
    	err := AtomicWrite(file, data, 0o750)
    	assert.NoError(t, err)
    	f, err := os.Open(file)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:10:54 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top