@@ -167,14 +167,16 @@ fn circleci_job_status_steps_for_rails_fixture() {
167167 let jobs = load_jobs_map ( & output. path ( ) . join ( ".circleci/main.yml" ) ) ;
168168
169169 for job_id in & with_sources {
170- let job_value = jobs. get ( job_id) . unwrap_or_else ( || {
171- panic ! ( "expected job {job_id} in generated main.yml" ) ;
170+ let sanitized_id = job_id. replace ( [ '/' , '\\' ] , "_" ) ;
171+ let job_value = jobs. get ( & sanitized_id) . unwrap_or_else ( || {
172+ panic ! ( "expected job {sanitized_id} (from {job_id}) in generated main.yml" ) ;
172173 } ) ;
173174 assert_has_job_status_steps ( job_id, job_value) ;
174175 }
175176
176177 for job_id in & without_sources {
177- if let Some ( job_value) = jobs. get ( job_id) {
178+ let sanitized_id = job_id. replace ( [ '/' , '\\' ] , "_" ) ;
179+ if let Some ( job_value) = jobs. get ( & sanitized_id) {
178180 assert_absent_job_status_steps ( job_id, job_value) ;
179181 }
180182 }
@@ -197,14 +199,16 @@ fn circleci_job_status_steps_for_docspring_config() {
197199 let jobs = load_jobs_map ( & output. path ( ) . join ( ".circleci/main.yml" ) ) ;
198200
199201 for job_id in & with_sources {
200- let job_value = jobs. get ( job_id) . unwrap_or_else ( || {
201- panic ! ( "expected job {job_id} in generated main.yml" ) ;
202+ let sanitized_id = job_id. replace ( [ '/' , '\\' ] , "_" ) ;
203+ let job_value = jobs. get ( & sanitized_id) . unwrap_or_else ( || {
204+ panic ! ( "expected job {sanitized_id} (from {job_id}) in generated main.yml" ) ;
202205 } ) ;
203206 assert_has_job_status_steps ( job_id, job_value) ;
204207 }
205208
206209 for job_id in & without_sources {
207- if let Some ( job_value) = jobs. get ( job_id) {
210+ let sanitized_id = job_id. replace ( [ '/' , '\\' ] , "_" ) ;
211+ if let Some ( job_value) = jobs. get ( & sanitized_id) {
208212 assert_absent_job_status_steps ( job_id, job_value) ;
209213 }
210214 }
0 commit comments