From e803aa488c3a95193d3e3ae358b640c299f8f121 Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 23 Nov 2026 20:36:22 +0100 Subject: License --- tests/cli.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'tests/cli.rs') diff --git a/tests/cli.rs b/tests/cli.rs index 37546b1..faedb61 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -1,3 +1,10 @@ +/* + * This file is part of agent686 + * Copyright (C) 2026 Salmonik + * SPDX-License-Identifier: GPL-3.0-or-later + * https://git.2137697.xyz/agent686 + */ + use std::fs; use std::path::PathBuf; use std::process::Command; @@ -52,10 +59,7 @@ fn session_ids_cannot_escape_the_sessions_directory() { #[test] fn conflicting_flags_are_rejected() { - let output = agent() - .args(["-c", "--session", "abc"]) - .output() - .unwrap(); + let output = agent().args(["-c", "--session", "abc"]).output().unwrap(); assert_eq!(output.status.code(), Some(2)); assert!(String::from_utf8_lossy(&output.stderr).contains("cannot be combined")); @@ -238,7 +242,11 @@ fn list_and_show_and_doctor_support_json() { let body: String = lines.iter().map(|line| format!("{line}\n")).collect(); fs::write(sessions.join("demo.jsonl"), body).unwrap(); - let list = agent().env("HOME", &home).args(["--list", "--json"]).output().unwrap(); + let list = agent() + .env("HOME", &home) + .args(["--list", "--json"]) + .output() + .unwrap(); assert!(list.status.success(), "{list:?}"); let list_json: serde_json::Value = serde_json::from_slice(&list.stdout).unwrap(); assert!(list_json.is_array()); -- cgit v1.2.3