1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-23 22:45:11 +02:00
Files
starter/git/git_test.go
2024-10-14 13:14:37 +03:00

71 lines
1.3 KiB
Go

package git
import (
"testing"
)
func TestFind_LastTagVersion(t *testing.T) {
Otvet, err := Find_LastCommitDescribe()
if err != nil {
t.Error(err)
}
if Otvet == "" {
t.Error("TestFind_LastTagVersion() error: Otvet =''")
}
}
func TestShow_LastCommitVersion(t *testing.T) {
Show_LastCommitVersion()
}
func TestFind_LastCommitTime(t *testing.T) {
_, err := Find_LastCommitTime()
if err != nil {
t.Error("TestFind_LastCommitTime() error: ", err)
}
}
func TestFind_LastCommitHash(t *testing.T) {
_, err := Find_LastCommitHash()
if err != nil {
t.Error("Find_LastCommitHash() error: ", err)
}
}
func TestFind_CommitDescribe(t *testing.T) {
Hash, err := Find_LastCommitHash()
if err != nil {
t.Error("TestFind_CommitDescribe() error: ", err)
}
_, err = Find_CommitDescribe(Hash)
if err != nil {
t.Error("TestFind_CommitDescribe() error: ", err)
}
}
func TestFind_CommitTime(t *testing.T) {
Hash, err := Find_LastCommitHash()
if err != nil {
t.Error("TestFind_CommitTime() error: ", err)
}
_, err = Find_CommitTime(Hash)
if err != nil {
t.Error("TestFind_CommitTime() error: ", err)
}
}
func TestFind_Find_LastCommitHashes(t *testing.T) {
_, err := Find_LastCommitHashes(1)
if err != nil {
t.Error("Find_LastCommitHash() error: ", err)
}
}