@@ -89,6 +89,77 @@ TEST(fqn_compute_basic_rs) {
8989 PASS ();
9090}
9191
92+ TEST (fqn_compute_file_sibling_distinct ) {
93+ char * ts = cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.ts" , "__file__" );
94+ char * html = cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.html" , "__file__" );
95+ char * scss = cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.scss" , "__file__" );
96+ ASSERT_NOT_NULL (ts );
97+ ASSERT_NOT_NULL (html );
98+ ASSERT_NOT_NULL (scss );
99+ ASSERT_STR_NEQ (ts , html );
100+ ASSERT_STR_NEQ (ts , scss );
101+ ASSERT_STR_NEQ (html , scss );
102+ free (ts );
103+ free (html );
104+ free (scss );
105+ PASS ();
106+ }
107+
108+ TEST (fqn_compute_symbol_still_strips ) {
109+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.ts" , "BadgeComponent" ),
110+ "proj.app.badge.badge.component.BadgeComponent" );
111+ PASS ();
112+ }
113+
114+ TEST (fqn_module_siblings_still_share ) {
115+ ASSERT_FQN (cbm_pipeline_fqn_module ("proj" , "app/badge/badge.component.ts" ),
116+ "proj.app.badge.badge.component" );
117+ ASSERT_FQN (cbm_pipeline_fqn_module ("proj" , "app/badge/badge.component.html" ),
118+ "proj.app.badge.badge.component" );
119+ PASS ();
120+ }
121+
122+ /* #769: exact __file__ QNs for component siblings. */
123+ TEST (fqn_compute_file_sibling_exact ) {
124+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.ts" , "__file__" ),
125+ "proj.app.badge.badge.component.ts.__file__" );
126+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.html" , "__file__" ),
127+ "proj.app.badge.badge.component.html.__file__" );
128+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.component.scss" , "__file__" ),
129+ "proj.app.badge.badge.component.scss.__file__" );
130+ PASS ();
131+ }
132+
133+ TEST (fqn_compute_file_multi_extension ) {
134+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "app/badge/badge.spec.ts" , "__file__" ),
135+ "proj.app.badge.badge.spec.ts.__file__" );
136+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "archive.tar.gz" , "__file__" ),
137+ "proj.archive.tar.gz.__file__" );
138+ PASS ();
139+ }
140+
141+ TEST (fqn_compute_file_no_extension ) {
142+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "Makefile" , "__file__" ),
143+ "proj.Makefile.__file__" );
144+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "LICENSE" , "__file__" ),
145+ "proj.LICENSE.__file__" );
146+ PASS ();
147+ }
148+
149+ TEST (fqn_compute_file_dotfile ) {
150+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , ".gitignore" , "__file__" ),
151+ "proj..gitignore.__file__" );
152+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "config/.env" , "__file__" ),
153+ "proj.config..env.__file__" );
154+ PASS ();
155+ }
156+
157+ TEST (fqn_compute_file_index_ts ) {
158+ ASSERT_FQN (cbm_pipeline_fqn_compute ("proj" , "app/index.ts" , "__file__" ),
159+ "proj.app.index.ts.__file__" );
160+ PASS ();
161+ }
162+
92163/* ── Nested paths ─────────────────────────────────────────────── */
93164
94165TEST (fqn_compute_nested_two_levels ) {
@@ -595,6 +666,14 @@ SUITE(fqn) {
595666 RUN_TEST (fqn_file_qn_distinguishes_same_stem_header_source_issue964 );
596667 RUN_TEST (fqn_module_qn_still_strips_extension );
597668 RUN_TEST (fqn_compute_basic_rs );
669+ RUN_TEST (fqn_compute_file_sibling_distinct );
670+ RUN_TEST (fqn_compute_symbol_still_strips );
671+ RUN_TEST (fqn_module_siblings_still_share );
672+ RUN_TEST (fqn_compute_file_sibling_exact );
673+ RUN_TEST (fqn_compute_file_multi_extension );
674+ RUN_TEST (fqn_compute_file_no_extension );
675+ RUN_TEST (fqn_compute_file_dotfile );
676+ RUN_TEST (fqn_compute_file_index_ts );
598677
599678 /* fqn_compute: nested paths */
600679 RUN_TEST (fqn_compute_nested_two_levels );
0 commit comments