@@ -23,7 +23,7 @@ pub fn test_copy_empty_selection() {
2323
2424 // Try to copy with no selection
2525 let result = text_state. apply_action ( & mut ctx, & Action :: CopySelectedText ) ;
26- assert ! ( matches!( result, ActionResult :: InsertToClipboard ( s) if s. is_empty( ) ) ) ;
26+ assert ! ( matches!( result, ActionResult :: TextCopied ( s) if s. is_empty( ) ) ) ;
2727}
2828
2929#[ test]
@@ -51,7 +51,7 @@ pub fn test_copy_partial_selection() {
5151
5252 // Copy the selected text
5353 let result = text_state. apply_action ( & mut ctx, & Action :: CopySelectedText ) ;
54- assert ! ( matches!( result, ActionResult :: InsertToClipboard ( s) if s == "Hello" ) ) ;
54+ assert ! ( matches!( result, ActionResult :: TextCopied ( s) if s == "Hello" ) ) ;
5555}
5656
5757#[ test]
@@ -77,8 +77,8 @@ pub fn test_copy_full_selection() {
7777 // Copy the selected text
7878 let result = text_state. apply_action ( & mut ctx, & Action :: CopySelectedText ) ;
7979 match result {
80- ActionResult :: InsertToClipboard ( s) => assert_eq ! ( s, "Hello World" ) ,
81- _ => panic ! ( "Result is {result:?}, expected InsertToClipboard " ) ,
80+ ActionResult :: TextCopied ( s) => assert_eq ! ( s, "Hello World" ) ,
81+ _ => panic ! ( "Result is {result:?}, expected TextCopied " ) ,
8282 }
8383}
8484
@@ -107,7 +107,7 @@ pub fn test_copy_cyrillic_text() {
107107
108108 // Copy the selected text
109109 let result = text_state. apply_action ( & mut ctx, & Action :: CopySelectedText ) ;
110- assert ! ( matches!( result, ActionResult :: InsertToClipboard ( s) if s == "Привет" ) ) ;
110+ assert ! ( matches!( result, ActionResult :: TextCopied ( s) if s == "Привет" ) ) ;
111111}
112112
113113#[ test]
@@ -140,7 +140,7 @@ pub fn test_copy_after_editing() {
140140
141141 // Copy the selected text
142142 let result = text_state. apply_action ( & mut ctx, & Action :: CopySelectedText ) ;
143- assert ! ( matches!( result, ActionResult :: InsertToClipboard ( s) if s == "Test " ) ) ;
143+ assert ! ( matches!( result, ActionResult :: TextCopied ( s) if s == "Test " ) ) ;
144144}
145145
146146#[ test]
@@ -199,5 +199,5 @@ pub fn test_copy_selection_from_middle() {
199199 let result = text_state. apply_action ( & mut ctx, & Action :: CopySelectedText ) ;
200200
201201 // Verify the copy operation was successful and copied the correct text
202- assert ! ( matches!( result, ActionResult :: InsertToClipboard ( s) if s == "bro" ) ) ;
202+ assert ! ( matches!( result, ActionResult :: TextCopied ( s) if s == "bro" ) ) ;
203203}
0 commit comments