fork/gdu

git clone https://git.julia.blue/fork/gdu

cosmolifeat: move items to XDG trash with D key (#12) (#608)9ca5c60

master
428 B21 linesraw
1//go:build !windows && !linux && !darwin
2
3package remove
4
5import (
6	"os"
7	"path/filepath"
8	"testing"
9
10	"github.com/stretchr/testify/require"
11)
12
13func TestRenameNoReplacePropagatesLstatErrors(t *testing.T) {
14	root := t.TempDir()
15	loop := filepath.Join(root, "loop")
16	require.NoError(t, os.Symlink("loop", loop))
17
18	err := renameNoReplace(filepath.Join(root, "source"), filepath.Join(loop, "destination"))
19
20	require.Error(t, err)
21}