blob: 1334aa2356f146bc6ac381ddd68d7319c513282a [file] [log] [blame]
Serge Bazanskibe538db2020-11-12 00:22:42 +01001package cmd
2
3import (
4 "testing"
5)
6
7func TestGuessShell(t *testing.T) {
8 t.Parallel()
9
10 for _, test := range [][]string{
11 {"/bin/bash", "bash"},
12 {"/usr/bin/zsh", "zsh"},
13 {"/usr/bin/zsh5", "zsh"},
14 } {
15 if result := guessShell(test[0]); result != test[1] {
16 t.Errorf("Guessed %q instead of %q from %q", result, test[1], test[0])
17 }
18 }
19}