Skip to content

Commit

Permalink
[test](main): add remove dash tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Woon-2 committed Oct 1, 2023
1 parent d699cab commit 24326d6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/gclp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ THE SOFTWARE.

using namespace std::literals;

TEST(RemoveDashTest, RemoveSingleDash) {
auto src = "-abcdefg"sv;

EXPECT_EQ(clp::detail::remove_dash(src), "abcdefg"sv);
}

TEST(RemoveDashTest, RemoveDoubleDash) {
auto src = "--abcdefg"sv;

EXPECT_EQ(clp::detail::remove_dash(src), "abcdefg"sv);
}

TEST(SplitWordsTest, SplitWords) {
auto splitted = clp::detail::split_words(
"TestCLI -a 1 -b 3.14 -c c -d Hello -e World! -f 1.6 -g 1"sv
Expand Down

0 comments on commit 24326d6

Please sign in to comment.