-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- **PR Description** Some file icons weren't drawn correctly, e.g. the ones for `tailwind.config.ts` or `nuxt.config.ts`, but also many others. Fixes #3747. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] If a new UserConfig entry was added, make sure it can be hot-reloaded (see [here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig)) * [ ] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
- Loading branch information
Showing
2 changed files
with
60 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package icons | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestFileIcons(t *testing.T) { | ||
t.Run("TestFileIcons", func(t *testing.T) { | ||
for name, icon := range nameIconMap { | ||
if len([]rune(icon.Icon)) != 1 { | ||
t.Errorf("nameIconMap[\"%s\"] is not a single rune", name) | ||
} | ||
} | ||
|
||
for ext, icon := range extIconMap { | ||
if len([]rune(icon.Icon)) != 1 { | ||
t.Errorf("extIconMap[\"%s\"] is not a single rune", ext) | ||
} | ||
} | ||
}) | ||
} |