-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* preliminary rename menu * drive rename works * remove unneeded statements * update go version to fix ci * add build tags for ci * update actions to fix deprecation warnings
- Loading branch information
Showing
8 changed files
with
228 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package common | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// Write a sample .xdg-volume-info file and check that it can be read. | ||
func TestXDGVolumeInfo(t *testing.T) { | ||
const expected = "some-volume name *()! $" | ||
content := TemplateXDGVolumeInfo(expected) | ||
file, _ := os.CreateTemp("", "onedriver-test-*") | ||
os.WriteFile(file.Name(), []byte(content), 0600) | ||
driveName, err := GetXDGVolumeInfoName(file.Name()) | ||
require.NoError(t, err) | ||
assert.Equal(t, expected, driveName) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.