Changeset 94 for trunk/Forms
- Timestamp:
- Feb 3, 2022, 10:53:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormTest.pas
r92 r94 115 115 116 116 procedure TFormTest.FormCreate(Sender: TObject); 117 const 118 VCardVersion = 'VERSION:2.1'; 117 119 begin 118 120 TestCases := TTestCases.Create; … … 120 122 with TTestCaseLoadSave(AddNew('Load and save', TTestCaseLoadSave)) do begin 121 123 Input := VCardBegin + LineEnding + 122 'VERSION:2.1'+ LineEnding +124 VCardVersion + LineEnding + 123 125 'N:Surname;Name' + LineEnding + 124 126 'FN:Name Surname' + LineEnding + … … 128 130 with TTestCaseLoadSave(AddNew('Long text', TTestCaseLoadSave)) do begin 129 131 Input := VCardBegin + LineEnding + 130 'VERSION:2.1'+ LineEnding +132 VCardVersion + LineEnding + 131 133 'NOTE:This is some long test which is really multi-lined each line is on d' + LineEnding + 132 134 ' ifferent line so it is on multiple lines.' + LineEnding + … … 136 138 with TTestCaseLoadSave(AddNew('Multi-line', TTestCaseLoadSave)) do begin 137 139 Input := VCardBegin + LineEnding + 138 'VERSION:2.1'+ LineEnding +140 VCardVersion + LineEnding + 139 141 'NOTE:First line\nsecond line\nempty line\n\nlast line' + LineEnding + 140 142 VCardEnd + LineEnding; 141 143 Output := Input; 142 144 end; 143 AddNew('Encoding base64', TTestCaseLoadSave);144 AddNew('Encoding quoted-printable', TTestCaseLoadSave);145 AddNew('Image format', TTestCaseLoadSave);145 //AddNew('Encoding base64', TTestCaseLoadSave); 146 //AddNew('Encoding quoted-printable', TTestCaseLoadSave); 147 //AddNew('Image format', TTestCaseLoadSave); 146 148 with TTestCaseLoadSave(AddNew('Empty', TTestCaseLoadSave)) do begin 147 149 Input := ''; … … 154 156 with TTestCaseLoadSave(AddNew('Missing end', TTestCaseLoadSave)) do begin 155 157 Input := VCardBegin + LineEnding + 156 'VERSION:2.1'+ LineEnding +158 VCardVersion + LineEnding + 157 159 'N:Surname;Name' + LineEnding + 158 160 'FN:Name Surname' + LineEnding; … … 160 162 end; 161 163 with TTestCaseLoadSave(AddNew('Missing start', TTestCaseLoadSave)) do begin 162 Input := 'VERSION:2.1'+ LineEnding +164 Input := VCardVersion + LineEnding + 163 165 'N:Surname;Name' + LineEnding + 164 166 'FN:Name Surname' + LineEnding + 165 167 VCardEnd + LineEnding; 166 168 Output := ''; 169 end; 170 with TTestCaseCheckProperty(AddNew('Propery FN', TTestCaseCheckProperty)) do begin 171 Index := cfFullName; 172 Value := 'Name Surname'; 173 Input := VCardBegin + LineEnding + 174 VCardVersion + LineEnding + 175 'FN:' + Value + LineEnding + 176 VCardEnd + LineEnding; 177 end; 178 with TTestCaseCheckProperty(AddNew('Escaped new lines in text', TTestCaseCheckProperty)) do begin 179 Index := cfNote; 180 Value := 'Line' + #13#10 + 'Line'; 181 Input := VCardBegin + LineEnding + 182 VCardVersion + LineEnding + 183 'NOTE:Line\nLine' + LineEnding + 184 VCardEnd + LineEnding; 185 end; 186 with TTestCaseCheckProperty(AddNew('Compound value', TTestCaseCheckProperty)) do begin 187 Index := cfFirstName; 188 Value := 'FirstName'; 189 Input := VCardBegin + LineEnding + 190 VCardVersion + LineEnding + 191 'N:Surname;FirstName;;;' + LineEnding + 192 VCardEnd + LineEnding; 167 193 end; 168 194 end;
Note:
See TracChangeset
for help on using the changeset viewer.