Ticket #2798: test_include_once.au3

File test_include_once.au3, 872 bytes (added by mLipok, 6 years ago)

REPRO

Line 
1#include <MsgBoxConstants.au3>
2Local $sScript = '#include-once' & @CRLF
3
4For $i = 1 To 20
5        $sScript &= '#include "' & $i & '.au3"' & @CRLF
6Next
7
8For $i = 1 To 20
9        FileDelete($i & '.au3')
10        FileWrite($i & '.au3', $sScript)
11        If $i = 15 Then
12                FileWrite($i & '.au3', '#include-once' & @CRLF)
13                FileWrite($i & '.au3', 'Func _test()' & @CRLF)
14                FileWrite($i & '.au3', @TAB & 'MsgBox(0, "TEST INFO", "")' & @CRLF)
15                FileWrite($i & '.au3', 'EndFunc' & @CRLF)
16        EndIf
17Next
18FileDelete('test.au3')
19FileWrite('test.au3', $sScript & @CRLF & '_Test()')
20ShellExecute('15.au3', '', '', 'edit')
21WinWaitActive("[REGEXPTITLE:(?i)(.*15.au3.*SciTE.*)]")
22ShellExecute('test.au3', '', '', 'edit')
23WinWaitActive("[REGEXPTITLE:(?i)(.*test.au3.*SciTE.*)]")
24
25MsgBox($MB_SYSTEMMODAL, "How To", "Just run test.au3" & @CRLF & "Of course after when you close this MsgBox info.")