Skip to content

Commit d57846c

Browse files
mbrlclaude
andcommitted
test(discover): pin moderate-mode JVM package exception (DeusData#2661)
Below a JVM source root, a package named like a fast-mode skip dir (integration/) is kept in moderate mode, while a top-level integration/ stays skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: mbrl <mbrl@local>
1 parent 259db16 commit d57846c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎tests/test_discover.c‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,21 @@ TEST(discover_keeps_jvm_packages_named_like_build_dirs_issue2661) {
13751375
ASSERT_FALSE(discover_has_rel_path(files, count, "src/main/target/Out.java"));
13761376
ASSERT_FALSE(discover_has_rel_path(files, count, "src/main/java/com/.git/H.java"));
13771377
ASSERT_EQ(count, 3);
1378+
cbm_discover_free(files, count);
1379+
1380+
/* Moderate/fast mode: a package named like a fast-mode skip dir is kept
1381+
* below a JVM source root, while the same name at the top stays skipped. */
1382+
th_write_file(TH_PATH(base, "src/main/java/com/acme/integration/I.java"),
1383+
"package com.acme.integration;\nclass I {}\n");
1384+
th_write_file(TH_PATH(base, "integration/Top.java"), "class Top {}\n");
1385+
1386+
cbm_discover_opts_t mod_opts = {.mode = CBM_MODE_MODERATE};
1387+
files = NULL;
1388+
count = 0;
1389+
rc = cbm_discover(base, &mod_opts, &files, &count);
1390+
ASSERT_EQ(rc, 0);
1391+
ASSERT_TRUE(discover_has_rel_path(files, count, "src/main/java/com/acme/integration/I.java"));
1392+
ASSERT_FALSE(discover_has_rel_path(files, count, "integration/Top.java"));
13781393

13791394
cbm_discover_free(files, count);
13801395
th_cleanup(base);

0 commit comments

Comments
 (0)