Skip to content

Commit a6a8fa4

Browse files
committed
test: fix chewing_version test
1 parent 4d58744 commit a6a8fa4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test-config.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,11 @@ void test_runtime_version()
767767

768768
ok(version != NULL, "chewing_version returns a version string");
769769

770-
sprintf(buf, "%d.%d.%d-%s", major, minor, patch, extra);
770+
sprintf(buf, "%d.%d.%d", major, minor, patch);
771+
if (strlen(extra) != 0) {
772+
strcat(buf, "-");
773+
strcat(buf, extra);
774+
}
771775
ok(strcmp(buf, version) == 0, "chewing_version can be created from components");
772776
}
773777

0 commit comments

Comments
 (0)