forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocsparser.livecodescript
More file actions
49 lines (39 loc) · 1.64 KB
/
Copy pathdocsparser.livecodescript
File metadata and controls
49 lines (39 loc) · 1.64 KB
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
39
40
41
42
43
44
45
46
47
48
49
script "DocsParser"
/*
Copyright (C) 2015 LiveCode Ltd.
This file is part of LiveCode.
LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.
LiveCode 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 General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
on TestSetup
-- Only run these tests on desktop platforms
if the platform is not among the items of "MacOS,Windows,Linux" then
return "SKIP Tests are not runnable on" && the platform
end if
local tDocsParser
put TestGetEngineRepositoryPath() & "/ide-support/revdocsparser.livecodescript" into tDocsParser
start using stack tDocsParser
end TestSetup
on TestBug16323
local tDoc
put "/*" into tDoc
put return & "Name: OnOpen" after tDoc
put return & "Type: message" after tDoc
put return & "Syntax: OnOpen" after tDoc
put return & "Name: OnClose" after tDoc
put return & "Type: message" after tDoc
put return & "Syntax: OnClose" after tDoc
put return & "*/" after tDoc
put return & "module com.livecode.widget" after tDoc
local tParsed
put revDocsGenerateDocsFileFromText(tDoc, "") into tParsed
local tArray
put revDocsParseDocTextToLibraryArray("", tVar, "", "") into tArray
TestAssert "unwanted syntax element accumulation", tArray["doc"][2]["Syntax"][2] is empty
end TestBug16323