2014-06-04 17:40:09 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2014-09-09 16:12:46 +00:00
|
|
|
"github.com/github/git-media/gitmedia"
|
2014-06-04 17:40:09 +00:00
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestVersionOnEmptyRepository(t *testing.T) {
|
|
|
|
repo := NewRepository(t, "empty")
|
2014-06-04 18:57:20 +00:00
|
|
|
defer repo.Test()
|
|
|
|
|
2014-06-04 17:44:07 +00:00
|
|
|
repo.AddPath(repo.Path, ".git")
|
|
|
|
repo.AddPath(repo.Path, "subdir")
|
2014-06-04 17:40:09 +00:00
|
|
|
|
|
|
|
cmd := repo.Command("version")
|
2014-09-15 21:52:13 +00:00
|
|
|
cmd.Output = gitmedia.UserAgent
|
2014-06-04 17:40:09 +00:00
|
|
|
|
2014-06-26 21:00:51 +00:00
|
|
|
cmd = repo.Command("version", "--comics")
|
2014-09-15 21:52:13 +00:00
|
|
|
cmd.Output = fmt.Sprintf("%s\nNothing may see Gah Lak Tus and survive!", gitmedia.UserAgent)
|
2014-06-26 21:00:51 +00:00
|
|
|
|
|
|
|
cmd = repo.Command("version", "-c")
|
2014-09-15 21:52:13 +00:00
|
|
|
cmd.Output = fmt.Sprintf("%s\nNothing may see Gah Lak Tus and survive!", gitmedia.UserAgent)
|
2014-06-04 17:40:09 +00:00
|
|
|
}
|