|
3 | 3 | ; Right now, only commands that can be easily tested in 1-2 lines are tested. |
4 | 4 | ;;;;;;;;;;;;;;;;;;;;;; |
5 | 5 |
|
6 | | -N_TESTS = 50 |
| 6 | +N_TESTS = 52 |
7 | 7 |
|
8 | 8 | GoSub, run_tests |
9 | 9 | if tests_run != %N_TESTS% |
@@ -120,6 +120,9 @@ goto l_after_gui |
120 | 120 | return |
121 | 121 | l_after_gui: |
122 | 122 | sleep 10 |
| 123 | + |
| 124 | +;;;;;;;;;;;;;;;;;;; TESTS ;;;;;;;;;;;;;;;;;;; |
| 125 | + |
123 | 126 | ifwinnotexist, ahk_x11_test_gui |
124 | 127 | { |
125 | 128 | fail_reason = gui win not exist |
@@ -518,7 +521,7 @@ gosub assert |
518 | 521 |
|
519 | 522 | ; ### SEND/HOTKEY/HOTSTRING TESTS ### |
520 | 523 |
|
521 | | -send {tab}{tab}^a{del} ; focus and reset |
| 524 | +send {tab}^a{del} ; focus and reset |
522 | 525 | sleep 20 |
523 | 526 | send 123 |
524 | 527 | sleep 20 |
@@ -566,7 +569,7 @@ goto l_hotstring_tests |
566 | 569 | if a_index > 50 |
567 | 570 | break |
568 | 571 | } |
569 | | - expect = hotstring testhotstringbtw,gui_edit,%hotstring_output% |
| 572 | + expect = hotstring %hotstring_input%,gui_edit,%hotstring_output% |
570 | 573 | gosub assert |
571 | 574 | return |
572 | 575 | l_hotstring_tests: |
@@ -600,6 +603,9 @@ hotstring_input = .testhotstringnoendchar |
600 | 603 | hotstring_output = .immediate |
601 | 604 | gosub test_hotstring |
602 | 605 |
|
| 606 | +send ^a{del} |
| 607 | +sleep 10 |
| 608 | + |
603 | 609 | goto l_after_f2_hotkey |
604 | 610 | hotkey_f2: |
605 | 611 | hotkey_f2_success = 1 |
@@ -655,6 +661,34 @@ expect = hotkey xbutton2,hotkey_xbutton2_success,1 |
655 | 661 | gosub assert |
656 | 662 | hotkey, xbutton2, off |
657 | 663 |
|
| 664 | +goto l_after_hotkey_with_send_hotkey |
| 665 | + hotkey_hotkey_with_send: |
| 666 | + send, bcd |
| 667 | + return |
| 668 | +l_after_hotkey_with_send_hotkey: |
| 669 | +hotkey, a, hotkey_hotkey_with_send |
| 670 | +runwait, xdotool key a |
| 671 | +sleep 20 |
| 672 | +gui submit, nohide |
| 673 | +expect = hotkey with send,gui_edit,bcd |
| 674 | +gosub assert |
| 675 | +hotkey, a, off |
| 676 | +send ^a{del} |
| 677 | +sleep 10 |
| 678 | +goto l_after_hotkey_with_send_not_first_cmd_hotkey |
| 679 | + hotkey_hotkey_with_send_not_first_cmd: |
| 680 | + sleep 1 |
| 681 | + send, efg |
| 682 | + return |
| 683 | +l_after_hotkey_with_send_not_first_cmd_hotkey: |
| 684 | +hotkey, a, hotkey_hotkey_with_send_not_first_cmd |
| 685 | +runwait, xdotool key a |
| 686 | +sleep 20 |
| 687 | +gui submit, nohide |
| 688 | +expect = hotkey with send,gui_edit,efg |
| 689 | +gosub assert |
| 690 | +hotkey, a, off |
| 691 | + |
658 | 692 | Send, {LButton} |
659 | 693 | sleep 20 |
660 | 694 | expect = send {lbutton},gui_button_clicked_success,1 |
|
0 commit comments