forked from Uberi/Yunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStdout.ahk
38 lines (35 loc) · 977 Bytes
/
Stdout.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class YunitStdOut
{
Update(Category, Test, Result) ;wip: this only supports one level of nesting?
{
if IsObject(Result)
{
Details := " at line " Result.Line " " Result.Message "(" Result.File ")"
Status := "FAIL"
}
else
{
Details := ""
Status := "PASS"
}
FileAppend, %Status%: %Category%.%Test% %Details%`n, *
}
}
class YunitPorcelainStdOut
{
Update(Category, Test, Result) ;wip: this only supports one level of nesting?
{
if IsObject(Result)
{
; Not displayed: What/Extra: Exception(Message [, What, Extra])
Details := "`t" Result.Line "`t" Result.File "`t" Result.Message
Status := "FAIL"
}
else
{
Details := ""
Status := "PASS"
}
FileAppend, %Status%`t%Category%`t%Test%%Details%`n, *
}
}