(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestHandleDir(t *testing.T) { |
| 11 | assert := is.New(t) |
| 12 | |
| 13 | os.Setenv("CATPPUCCIN", "pog") |
| 14 | os.Setenv("NEOVIM", "chad/") |
| 15 | |
| 16 | r1 := HandleDir("this/shouldnt/change") |
| 17 | assert.True(r1 == "this/shouldnt/change") // Unchanging directory should not change |
| 18 | |
| 19 | r2 := HandleDir("$CATPPUCCIN/is/pog") |
| 20 | assert.True(r2 == "pog/is/pog") // Catppuccin should always be pog |
| 21 | |
| 22 | r3 := HandleDir("catppuccin/is/$CATPPUCCIN/nice") |
| 23 | assert.True(r3 == "catppuccin/is/pog/nice") // Catppuccin should always be pog, even in the middle |
| 24 | |
| 25 | r4 := HandleDir("neovim/is/a/$NEOVIM/text/editor") |
| 26 | assert.True(r4 == "neovim/is/a/chad/text/editor") // Neovim should always be a chad editor |
| 27 | } |
nothing calls this directly
no test coverage detected