1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-29 23:38:14 +02:00

сделал Show_LastCommitVersion()

This commit is contained in:
Nikitin Aleksandr
2024-10-14 13:14:37 +03:00
parent 9f88648f69
commit 00cee818f7
2 changed files with 203 additions and 33 deletions

View File

@@ -1,10 +1,12 @@
package git
import "testing"
import (
"testing"
)
func TestFind_LastTagVersion(t *testing.T) {
Otvet, err := Find_LastCommitVersion()
Otvet, err := Find_LastCommitDescribe()
if err != nil {
t.Error(err)
}
@@ -17,3 +19,52 @@ func TestFind_LastTagVersion(t *testing.T) {
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)
}
}