Skip to content

Commit

Permalink
test tools concformatstring
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Nov 1, 2024
1 parent 5726e74 commit 613a703
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/testutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ namespace
}
}

void test_concformatstring()
{
std::printf("Testing concformatstring\n");
char s[260];
std::memset(s, 0, sizeof s);
const char *fmt = "test %s";
concformatstring(s, fmt, "test2");
assert(std::string(s) == "test test2");
}

void testcopystring()
{
//test copy with enough chars
Expand Down Expand Up @@ -678,6 +688,7 @@ testing tools functionality\n\
test_detrnd();
testpath();
testcpath();
test_concformatstring();
testcopystring();
testconcatstring();
test_newconcatstring();
Expand Down

0 comments on commit 613a703

Please sign in to comment.