Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestAtomicCopy (0.26 sec)

  1. pkg/file/file_test.go

    	assert.Equal(t, m.Mode(), 0o750)
    
    	body, _ := io.ReadAll(f)
    	// Contents should be copied
    	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)
    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