aboutsummaryrefslogtreecommitdiff
path: root/tests/test_utils.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-04-06 12:31:05 -0400
committerGitHub <noreply@github.com>2026-04-06 12:31:05 -0400
commitd01b465eee667e8efa4aa7c3088dc7af18ea2ab2 (patch)
treebf63c1378044c446f62dd20ce956a5a6d5e1973a /tests/test_utils.c
parent83831af6502e68fe6199c29614e2df68ffbca170 (diff)
parentdfe3420de345a7d4c6a529e1c240138ca9852c86 (diff)
downloadstasis-d01b465eee667e8efa4aa7c3088dc7af18ea2ab2.tar.gz
Merge pull request #128 from jhunkeler/manylinuxHEADnextmaster
Manylinux
Diffstat (limited to 'tests/test_utils.c')
-rw-r--r--tests/test_utils.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_utils.c b/tests/test_utils.c
index 0e2eb7b..cfe79e0 100644
--- a/tests/test_utils.c
+++ b/tests/test_utils.c
@@ -213,17 +213,21 @@ void test_git_clone_and_describe() {
// test git_describe is functional
char *taginfo_none = git_describe(".");
STASIS_ASSERT(taginfo_none != NULL, "should be a git hash, not NULL");
+ puts(taginfo_none);
+ STASIS_ASSERT(is_git_sha(taginfo_none) == true, "not a git hash");
system("git tag -a 1.0.0 -m Mock");
system("git push --tags origin");
- char *taginfo = git_describe(".");
+ const char *taginfo = git_describe(".");
+ puts(taginfo);
STASIS_ASSERT(taginfo != NULL, "should be 1.0.0, not NULL");
- STASIS_ASSERT(strcmp(taginfo, "1.0.0") == 0, "just-created tag was not described correctly");
+ STASIS_ASSERT(startswith(taginfo, "1.0.0") == true, "just-created tag was not described correctly");
chdir("..");
char *taginfo_outer = git_describe(repo);
+ puts(taginfo_outer);
STASIS_ASSERT(taginfo_outer != NULL, "should be 1.0.0, not NULL");
- STASIS_ASSERT(strcmp(taginfo_outer, "1.0.0") == 0, "just-created tag was not described correctly (out-of-dir invocation)");
+ STASIS_ASSERT(startswith(taginfo_outer, "1.0.0") == true, "just-created tag was not described correctly (out-of-dir invocation)");
char *taginfo_bad = git_describe("abc1234_not_here_or_there");
STASIS_ASSERT(taginfo_bad == NULL, "a repository that shouldn't exist... exists and has a tag.");