Skip to content

Commit

Permalink
[unittest] Add [*] test to GlobPatternTest.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jul 26, 2023
1 parent 02c11c5 commit 16b2569
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/unittests/Support/GlobPatternTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ TEST_F(GlobPatternTest, SpecialCharsInCharacterClass) {
EXPECT_TRUE(Pat1->match("^"));
EXPECT_FALSE(Pat1->match("*?^"));
EXPECT_FALSE(Pat1->match(""));

Expected<GlobPattern> Pat2 = GlobPattern::create("[*]");
ASSERT_TRUE((bool)Pat2);
EXPECT_TRUE(Pat2->match("*"));
EXPECT_FALSE(Pat2->match("]"));
}

TEST_F(GlobPatternTest, Invalid) {
Expand Down

0 comments on commit 16b2569

Please sign in to comment.