2014-06-04 17:40:09 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"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")
|
|
|
|
cmd.Output = fmt.Sprintf("git-media v%s", Version)
|
|
|
|
|
|
|
|
cmd = repo.Command("version", "-comics")
|
|
|
|
cmd.Output = fmt.Sprintf("git-media v%s\nNothing may see Gah Lak Tus and survive.", Version)
|
|
|
|
}
|