Skip to content

Commit 2da49cd

Browse files
test: add regression test for branch name single-quote escaping in pipeline triggers (#183)
* Initial plan * test: add branch single-quote escaping assertion to pipeline resources test Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/7f2f137a-e8e6-47b2-ade6-1f7a23e6f5dc Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
1 parent 5e3ac1b commit 2da49cd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/compile/common.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2348,11 +2348,12 @@ mod tests {
23482348
pipeline: Some(crate::compile::types::PipelineTrigger {
23492349
name: "Build's Pipeline".to_string(),
23502350
project: Some("My'Project".to_string()),
2351-
branches: vec!["main".to_string()],
2351+
branches: vec!["main".to_string(), "it's-branch".to_string()],
23522352
}),
23532353
});
23542354
let result = generate_pipeline_resources(&triggers).unwrap();
23552355
assert!(result.contains("source: 'Build''s Pipeline'"));
23562356
assert!(result.contains("project: 'My''Project'"));
2357+
assert!(result.contains("- 'it''s-branch'"));
23572358
}
23582359
}

0 commit comments

Comments
 (0)