(415e1c3) Fix worklane.ts tool when passed multi-line args

This commit is contained in:
2026-05-15 20:59:29 +02:00
parent 2a96abd3b0
commit 73e5aee2a2
4 changed files with 174 additions and 5 deletions
+29
View File
@@ -97,6 +97,35 @@ fn add_formats_ticket_correctly() {
assert!(content.contains("backlog"));
}
#[test]
fn add_joins_multiple_descriptions() {
let temp = TempDir::new().unwrap();
setup_worklane(&temp);
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(&temp.path())
.args([
"add",
"--title", "Multi desc ticket",
"--description", "Line one",
"--description", "Line two",
])
.assert()
.success();
let files: Vec<_> = fs::read_dir(temp.child(".worklane").join("backlog"))
.unwrap()
.filter_map(|e| e.ok())
.collect();
assert_eq!(files.len(), 1);
let content = fs::read_to_string(files[0].path()).unwrap();
assert!(content.contains("Line one"));
assert!(content.contains("Line two"));
assert!(content.contains("\n"));
}
#[test]
fn add_with_optional_fields_uses_defaults() {
let temp = TempDir::new().unwrap();