File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#[ cfg( test) ]
44mod tests {
55 use crate :: agent_cmd:: cli:: { CopyArgs , ExportArgs } ;
6- use crate :: agent_cmd:: loader:: {
7- load_builtin_agents, parse_frontmatter, read_file_with_encoding,
8- } ;
6+ use crate :: agent_cmd:: loader:: { load_builtin_agents, parse_frontmatter} ;
97 use crate :: agent_cmd:: types:: AgentMode ;
8+ use crate :: utils:: file:: read_file_with_encoding;
109
1110 #[ test]
1211 fn test_read_file_with_utf8 ( ) {
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ pub struct InteractiveArgs {
187187 ) ]
188188 pub dangerously_bypass_approvals_and_sandbox : bool ,
189189
190- /// Tell the agent to use the specified directory as its working root
190+ /// Tell the agent to use the specified directory as its working directory
191191 #[ arg(
192192 long = "cd" ,
193193 short = 'C' ,
@@ -857,6 +857,7 @@ pub struct HistoryClearArgs {
857857#[ cfg( test) ]
858858mod tests {
859859 use super :: * ;
860+ use clap:: CommandFactory ;
860861 use clap:: Parser ;
861862
862863 // ==========================================================================
@@ -969,6 +970,14 @@ mod tests {
969970 assert ! ( args. prompt. is_empty( ) ) ;
970971 }
971972
973+ #[ test]
974+ fn test_cd_help_uses_working_directory ( ) {
975+ let help = Cli :: command ( ) . render_long_help ( ) . to_string ( ) ;
976+
977+ assert ! ( help. contains( "working directory" ) ) ;
978+ assert ! ( !help. contains( "working root" ) ) ;
979+ }
980+
972981 // ==========================================================================
973982 // Cli parsing tests
974983 // ==========================================================================
You can’t perform that action at this time.
0 commit comments