mirror of
https://github.com/reactos/ahk_tests.git
synced 2024-11-23 03:29:39 +00:00
[AHK_Window_title_space]
Add one more test to see why previous one is returning 'CRASH'. Works fine in win2k3 sp2. svn path=/trunk/ahk_tests/; revision=1832
This commit is contained in:
parent
510c79d0b1
commit
4b81c59d3c
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
ModuleExe = %A_WorkingDir%\Apps\HelloWorldSpace.exe
|
||||
TestName = 1.Space
|
||||
TestName = 1.space
|
||||
|
||||
; Terminate application
|
||||
TestsTotal++
|
||||
|
56
Window title space/space_lite.ahk
Normal file
56
Window title space/space_lite.ahk
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Edijs Kolesnikovics
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
ModuleExe = %A_WorkingDir%\Apps\HelloWorldSpaceLite.exe
|
||||
TestName = 2.space_lite
|
||||
|
||||
; Terminate application
|
||||
TestsTotal++
|
||||
SplitPath, ModuleExe, ProcessExe
|
||||
Process, Close, %ProcessExe%
|
||||
Process, WaitClose, %ProcessExe%, 4
|
||||
if ErrorLevel
|
||||
TestsFailed("Unable to terminate '" ProcessExe "' process.")
|
||||
else
|
||||
TestsOK("")
|
||||
|
||||
|
||||
TestsTotal++
|
||||
if bContinue
|
||||
{
|
||||
IfNotExist, %ModuleExe%
|
||||
TestsFailed("Can NOT find '" ModuleExe "'.")
|
||||
else
|
||||
{
|
||||
Run, %ModuleExe%
|
||||
WndCaption := "Hello, World | this is a space -> "
|
||||
SetTitleMatchMode, 3 ; A window's title must exactly match WinTitle to be a match.
|
||||
WinWaitActive, %WndCaption%,,5
|
||||
if ErrorLevel
|
||||
TestsFailed("OS removed the space from the end of the window caption.")
|
||||
else
|
||||
{
|
||||
Process, Close, %ProcessExe%
|
||||
Process, WaitClose, %ProcessExe%, 4
|
||||
if ErrorLevel
|
||||
TestsFailed("Unable to terminate '" ProcessExe "' process after running it.")
|
||||
else
|
||||
TestsOK("OS did not remove the space from the end of the window title.")
|
||||
}
|
||||
}
|
||||
}
|
@ -23,16 +23,21 @@ InitalizeCounters()
|
||||
params =
|
||||
(
|
||||
|
||||
1.Space
|
||||
1.space
|
||||
2.space_lite
|
||||
|
||||
)
|
||||
|
||||
if CheckParam()
|
||||
{
|
||||
; Those brackets are required!
|
||||
if 1 = 1.Space
|
||||
if 1 = 1.space
|
||||
{
|
||||
#include Space.ahk
|
||||
#include space.ahk
|
||||
}
|
||||
else if 1 = 2.space_lite
|
||||
{
|
||||
#include space_lite.ahk
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user