Skip to content

Commit

Permalink
Fix the folder test as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jun 3, 2022
1 parent 47e263e commit 1a4f7b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dialog/fileitem_test.go
Expand Up @@ -50,10 +50,15 @@ func TestFileItem_FolderName(t *testing.T) {
assert.Equal(t, "foldername", item.name)

item = f.newFileItem(storage.NewFileURI("/path/to/myapp.app/"), true)
assert.Equal(t, "myapp.app", item.name)
assert.Equal(t, "myapp", item.name)

item = f.newFileItem(storage.NewFileURI("/path/to/.maybeHidden/"), true)
assert.Equal(t, ".maybeHidden", item.name)

// Test that the extension remains for the list view.
f.view = listView
item = f.newFileItem(storage.NewFileURI("/path/to/myapp.app/"), true)
assert.Equal(t, "myapp.app", item.name)
}

func TestNewFileItem(t *testing.T) {
Expand Down

0 comments on commit 1a4f7b0

Please sign in to comment.