feat: 项目整体命名修改cache-schema-checker
All checks were successful
缓存序列化结构检查 / cache-schema-check (push) Has been skipped

This commit is contained in:
2026-07-14 11:03:34 +08:00
parent 114b053733
commit 110beb79c0
42 changed files with 197 additions and 199 deletions

View File

@@ -0,0 +1,28 @@
package com.codechecker.cache.analyze;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
class GlobMatcherTest {
@Test
void matchesPrefixWildcard() {
assertTrue(GlobMatcher.matches("tenant:db:content:*", "tenant:db:content:abc"));
assertTrue(GlobMatcher.matches("*:lock", "device:add:lock"));
assertTrue(GlobMatcher.matches("*lock*", "abTaskDetailUpdate:lock:x"));
assertTrue(GlobMatcher.matches("loginCount:*", "loginCount:13800000000"));
}
@Test
void matchesDoubleStarPath() {
assertTrue(GlobMatcher.matches("**/test/**", "jnpf-x/src/test/java/Foo.java"));
assertFalse(GlobMatcher.matches("**/test/**", "jnpf-x/src/main/java/Foo.java"));
}
@Test
void literalNoMatch() {
assertFalse(GlobMatcher.matches("tenant:db:content:*", "other:key"));
}
}