Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Code

392 commit(s) on main

Merge change request 01M70WES5ZZDJ6RP226WB11BBZ: Let people rename and remove their own passkeys keenan · 1h ago 4b8c9e1d
history blame raw 900 B
1package web
2
3import (
4 "testing"
5
6 "rodent.software/vole/internal/lang"
7)
8
9func TestFileIconsChooseByExtension(t *testing.T) {
10 t.Parallel()
11 for _, c := range []struct {
12 name, icon, class string
13 }{
14 {"main.go", "file-code", "lang-go"},
15 {"src/lib.rs", "file-code", "lang-rust"},
16 {"docs/readme.md", "book-open", "lang-text"},
17 {"config.yml", "sliders-horizontal", "lang-config"},
18 {"run.sh", "terminal", "lang-sh"},
19 {"logo.svg", "image", "lang-image"},
20 {"go.sum", "file-code", "lang-go"},
21 {"Dockerfile", "server", "lang-build"},
22 {"LICENSE", "file", ""},
23 } {
24 if got := fileIcon(c.name); got != c.icon {
25 t.Errorf("%s icon = %q, want %q", c.name, got, c.icon)
26 }
27 if got := lang.Class(c.name); got != c.class {
28 t.Errorf("%s class = %q, want %q", c.name, got, c.class)
29 }
30 if _, ok := iconPaths[c.icon]; !ok {
31 t.Errorf("%s uses unknown icon %q", c.name, c.icon)
32 }
33 }
34}
35