File tree Expand file tree Collapse file tree
src/cortex-tui/src/commands/executor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl CommandExecutor {
2626 if n. parse :: < usize > ( ) . is_ok ( ) {
2727 CommandResult :: SetValue ( "goto" . to_string ( ) , n. to_string ( ) )
2828 } else {
29- CommandResult :: Error ( format ! ( "Invalid message number: {} " , n) )
29+ CommandResult :: Error ( format ! ( "Invalid message number \" {} \" " , n) )
3030 }
3131 }
3232 None => CommandResult :: OpenModal ( ModalType :: Form ( "goto" . to_string ( ) ) ) ,
Original file line number Diff line number Diff line change @@ -389,7 +389,11 @@ fn test_goto_validation() {
389389 ) ) ;
390390
391391 let result = executor. execute_str ( "/goto abc" ) ;
392- assert ! ( matches!( result, CommandResult :: Error ( _) ) ) ;
392+ assert ! ( matches!(
393+ result,
394+ CommandResult :: Error ( ref msg)
395+ if msg == "Invalid message number \" abc\" " && !msg. contains( "number:" )
396+ ) ) ;
393397
394398 let result = executor. execute_str ( "/goto" ) ;
395399 assert ! ( matches!(
You can’t perform that action at this time.
0 commit comments