@@ -39,14 +39,52 @@ on TestDocsValidateDictionary
3939 put TestGetEngineRepositoryPath() & "/docs" into tDocsPath
4040 put revDocsParseDictionaryToLibraryArray(tDocsPath ) into tDocsArray
4141
42+ __TestDocsLibraryArray tDocsArray
43+ end TestDocsValidateDictionary
44+
45+ on TestDocsValidateExtractedLibraries
46+ local tExtractedDocsFolder
47+ put TestGetExtractedDocsFolder() into tExtractedDocsFolder
48+
49+ TestAssert "extracted docs folder exists" , there is a folder tExtractedDocsFolder
50+
51+ local tFiles
52+ put files (tExtractedDocsFolder ) into tFiles
53+
54+ TestAssert "some files are in the extracted docs folder" , tFiles is not empty
55+
56+ filter tFiles with "*.lcdoc"
57+
58+ TestAssert "some lcdoc files are in the extracted docs folder" , tFiles is not empty
59+
60+ set the itemDelimiter to "."
61+
62+ local tFile
63+ repeat for each line tFile in tFiles
64+ local tDocsPath , tDocsArray
65+ put tExtractedDocsFolder & slash & tFile into tDocsPath
66+
67+ put revDocsParseDocFileToLibraryArray(tDocsPath , item - 2 of tFile , "LiveCode" ) into tDocsArray
68+
69+ TestAssert "type of" && tFile && "is library" , tDocsArray ["type" ] is "library"
70+ TestAssert "name of" && tFile && "is not empty" , tDocsArray ["name" ] is not empty
71+ TestAssert "display name of" && tFile && "is not empty" , tDocsArray ["display name" ] is not empty
72+ TestAssert "author name of" && tFile && "is not empty" , tDocsArray ["author" ] is not empty
73+ TestAssert "description of" && tFile && "is not empty" , tDocsArray ["description" ] is not empty
74+
75+ __TestDocsLibraryArray tDocsArray ["doc" ]
76+ end repeat
77+ end TestDocsValidateExtractedLibraries
78+
79+ command __TestDocsLibraryArray pLibrary
4280 local tElement
4381
4482 local tReferences
45- repeat for each element tElement in tDocsArray
83+ repeat for each element tElement in pLibrary
4684 put true into tReferences [tElement ["type" ]][tElement ["display name" ]]
4785 end repeat
4886
49- repeat for each element tElement in tDocsArray
87+ repeat for each element tElement in pLibrary
5088 local tValue
5189 local tIndex
5290
@@ -240,7 +278,7 @@ on TestDocsValidateDictionary
240278 -- * test for ambiguous links
241279
242280 end repeat
243- end TestDocsValidateDictionary
281+ end __TestDocsLibraryArray
244282
245283command SplitParam @pParam
246284 -- find type
0 commit comments