Skip to content

Commit

Permalink
+ More yaml tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nandod committed Jun 4, 2012
1 parent fb9e841 commit 4eec267
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Bin/Test.yaml
Expand Up @@ -8,6 +8,7 @@
First line, then a break
Second line.
"A:Node:With:Colons": A:Value:With:Colons
ANodeWithoutColons: A value with "s
OtherNode:
Item: Europe
Item: America
Expand All @@ -18,3 +19,4 @@ OtherNode:
# values only, but that's the best we can do. Use | nodes when you can.
MultiLineNode2: >
Excuse me while I kiss the sky.
Html: <div><span style="float:left;margin:5px;text-align:center"><img width="65px" src="%IMAGE(kitto_logo_150)%"></img></span><span style="float:left;margin:1px;font-size:10pt"><p>TEST<br/>KDataCenter</p></span></div>
8 changes: 4 additions & 4 deletions Bin/dunit.ini
Expand Up @@ -2,17 +2,17 @@
AutoSave=1
Left=301
Top=77
Width=758
Height=504
Width=944
Height=671
Maximized=0
UseRegistry=0
ResultsPanel.Height=174
ErrorMessage.Height=75
ErrorMessage.Height=214
ErrorMessage.Visible=1
FailureList.ColumnWidth[0]=120
FailureList.ColumnWidth[1]=100
FailureList.ColumnWidth[2]=200
FailureList.ColumnWidth[3]=310
FailureList.ColumnWidth[3]=496
HideTestNodesOnOpen=0
BreakOnFailures=0
FailOnNoChecksExecuted=0
Expand Down
13 changes: 11 additions & 2 deletions Test/EF.YAMLTest.pas
Expand Up @@ -81,9 +81,18 @@ procedure TEFYAMLTestCase.TestRead;
LTree := TEFTree.Create;
try
FReader.LoadTreeFromFile(LTree, GetWorkDirectory + FILENAME);
CheckEquals(4, LTree.ChildCount);
CheckEquals(6, LTree.ChildCount);

CheckEquals('A:Node:With:Colons', LTree.Children[1].Name);
CheckEquals('A:Value:With:Colons', LTree.Children[1].AsString);

CheckEquals('ANodeWithoutColons', LTree.Children[2].Name);
CheckEquals('A value with "s', LTree.Children[2].AsString);

CheckEquals(4, LTree.Children[0].ChildCount);
CheckEqualsString('>', LTree.Children[3].ValueAttributes);
CheckEquals('>', LTree.Children[4].ValueAttributes);

CheckEquals('<div><span style="float:left;margin:5px;text-align:center"><img width="65px" src="%IMAGE(kitto_logo_150)%"></img></span><span style="float:left;margin:1px;font-size:10pt"><p>TEST<br/>KDataCenter</p></span></div>', LTree.Children[5].AsString);
finally
FreeAndNil(LTree);
end;
Expand Down

0 comments on commit 4eec267

Please sign in to comment.