|
59 | 59 | </tei:note> |
60 | 60 | </x:context> |
61 | 61 |
|
62 | | - <x:expect label="Then convert to Markdown"> |
63 | | - <tei:note>**Hello** there and welcome

Goodbye, and see you *again* soon</tei:note> |
| 62 | + <x:expect label="Then copy as is"> |
| 63 | + <tei:note> |
| 64 | + <tei:p><tei:emph rend="bold">Hello</tei:emph> there and welcome</tei:p> |
| 65 | + <tei:p>Goodbye, and see you <tei:emph rend="italic">again</tei:emph> soon</tei:p> |
| 66 | + </tei:note> |
64 | 67 | </x:expect> |
65 | 68 |
|
66 | 69 | </x:scenario> |
|
73 | 76 | </tei:note> |
74 | 77 | </x:context> |
75 | 78 |
|
76 | | - <x:expect label="Then convert to Markdown"> |
77 | | - <tei:note>**Hello** there and welcomeGoodbye, and see you *again* soon</tei:note> |
| 79 | + <x:expect label="Then copy as is"> |
| 80 | + <something><tei:emph rend="bold">Hello</tei:emph> there <unknown>and</unknown> welcome</something> |
| 81 | + <other>Goodbye, and see you <tei:emph rend="italic">again</tei:emph> soon</other> |
78 | 82 | </x:expect> |
79 | 83 |
|
80 | 84 | </x:scenario> |
|
87 | 91 | </tei:note> |
88 | 92 | </x:context> |
89 | 93 |
|
90 | | - <x:expect label="Then convert to Markdown"> |
91 | | - <tei:note>**Hello** there and welcomeGoodbye, and see you *again* soon</tei:note> |
| 94 | + <x:expect label="Then copy as is"> |
| 95 | + <tei:p><tei:emph rend="bold">Hello</tei:emph> there <unknown>and</unknown> welcome</tei:p> |
| 96 | + <other>Goodbye, and see you <tei:emph rend="italic">again</tei:emph> soon</other> |
| 97 | + </x:expect> |
| 98 | + |
| 99 | + </x:scenario> |
| 100 | + |
| 101 | + <!-- START AR - inverse tests of tei-to-manuforma-form.xspec --> |
| 102 | + <x:scenario label="When it has a single markdown paragraph"> |
| 103 | + |
| 104 | + <x:context> |
| 105 | + <tei:TEI> |
| 106 | + <tei:note>Hello World</tei:note> |
| 107 | + </tei:TEI> |
| 108 | + </x:context> |
| 109 | + |
| 110 | + <x:expect label="Wrap text in a p element"> |
| 111 | + <tei:TEI> |
| 112 | + <tei:note> |
| 113 | + <tei:p>Hello World</tei:p> |
| 114 | + </tei:note> |
| 115 | + </tei:TEI> |
| 116 | + </x:expect> |
| 117 | + |
| 118 | + </x:scenario> |
| 119 | + |
| 120 | + <x:scenario label="When it has two markdown paragraphs"> |
| 121 | + |
| 122 | + <x:context> |
| 123 | + <tei:TEI> |
| 124 | + <tei:note>Some text. |
| 125 | + |
| 126 | +Some more text.</tei:note> |
| 127 | + </tei:TEI> |
| 128 | + </x:context> |
| 129 | + |
| 130 | + <x:expect label="Wrap each paragraph in a p element"> |
| 131 | + <tei:TEI> |
| 132 | + <tei:note> |
| 133 | + <tei:p>Some text.</tei:p> |
| 134 | + <tei:p>Some more text.</tei:p> |
| 135 | + </tei:note> |
| 136 | + </tei:TEI> |
| 137 | + </x:expect> |
| 138 | + |
| 139 | + </x:scenario> |
| 140 | + |
| 141 | + <x:scenario label="When it has a single markdown paragraph with line breaks"> |
| 142 | + |
| 143 | + <x:context> |
| 144 | + <tei:TEI> |
| 145 | + <tei:note>Once upon |
| 146 | +a time |
| 147 | +in |
| 148 | +the |
| 149 | +West</tei:note> |
| 150 | + </tei:TEI> |
| 151 | + </x:context> |
| 152 | + |
| 153 | + <x:expect label="Wrap text in a p element with lb elements"> |
| 154 | + <tei:TEI> |
| 155 | + <tei:note> |
| 156 | + <tei:p>Once upon<tei:lb/> |
| 157 | +a time<tei:lb/> |
| 158 | +in<tei:lb/> |
| 159 | +the<tei:lb/> |
| 160 | +West</tei:p> |
| 161 | + </tei:note> |
| 162 | + </tei:TEI> |
| 163 | + </x:expect> |
| 164 | + |
| 165 | + </x:scenario> |
| 166 | + |
| 167 | + <x:scenario label="When it has two markdown paragraphs with line breaks (without hidden whitespace)"> |
| 168 | + |
| 169 | + <x:context> |
| 170 | + <tei:TEI> |
| 171 | + <tei:note>Once upon |
| 172 | +a time |
| 173 | +in |
| 174 | +the |
| 175 | +West |
| 176 | + |
| 177 | +Some more |
| 178 | +text.</tei:note> |
| 179 | + </tei:TEI> |
| 180 | + </x:context> |
| 181 | + |
| 182 | + <x:expect label="Wrap each paragraph in a p element with lb elements"> |
| 183 | + <tei:TEI> |
| 184 | + <tei:note> |
| 185 | + <tei:p>Once upon<tei:lb/> |
| 186 | +a time<tei:lb/> |
| 187 | +in<tei:lb/> |
| 188 | +the<tei:lb/> |
| 189 | +West</tei:p> |
| 190 | + <tei:p>Some more<tei:lb/> |
| 191 | +text.</tei:p> |
| 192 | + </tei:note> |
| 193 | + </tei:TEI> |
| 194 | + </x:expect> |
| 195 | + |
| 196 | + </x:scenario> |
| 197 | + |
| 198 | + <x:scenario label="When it has two markdown paragraphs with line breaks (with hidden whitespace)"> |
| 199 | + |
| 200 | + <x:context> |
| 201 | + <tei:TEI> |
| 202 | + <tei:note>Once upon |
| 203 | +a time |
| 204 | +in |
| 205 | +the |
| 206 | +West |
| 207 | + |
| 208 | +Some more |
| 209 | +text.</tei:note> |
| 210 | + </tei:TEI> |
| 211 | + </x:context> |
| 212 | + |
| 213 | + <x:expect label="Wrap each paragraph in a p element with lb elements"> |
| 214 | + <tei:TEI> |
| 215 | + <tei:note> |
| 216 | + <tei:p>Once upon<tei:lb/> |
| 217 | +a time<tei:lb/> |
| 218 | +in<tei:lb/> |
| 219 | +the<tei:lb/> |
| 220 | +West</tei:p> |
| 221 | + <tei:p>Some more<tei:lb/> |
| 222 | +text.</tei:p> |
| 223 | + </tei:note> |
| 224 | + </tei:TEI> |
| 225 | + </x:expect> |
| 226 | + |
| 227 | + </x:scenario> |
| 228 | + |
| 229 | + <x:scenario label="When it has a single markdown paragraph with italic"> |
| 230 | + |
| 231 | + <x:context> |
| 232 | + <tei:TEI> |
| 233 | + <tei:note>Once upon *a time* in the *West*</tei:note> |
| 234 | + </tei:TEI> |
| 235 | + </x:context> |
| 236 | + |
| 237 | + <x:expect label="Wrap text in a p element with italic emph elements"> |
| 238 | + <tei:TEI> |
| 239 | + <tei:note> |
| 240 | + <tei:p>Once upon <tei:emph rend="italic">a time</tei:emph> in the <tei:emph rend="italic">West</tei:emph></tei:p> |
| 241 | + </tei:note> |
| 242 | + </tei:TEI> |
92 | 243 | </x:expect> |
| 244 | + |
| 245 | + </x:scenario> |
| 246 | + |
| 247 | + <x:scenario label="When it has a single markdown paragraph with bold"> |
| 248 | + |
| 249 | + <x:context> |
| 250 | + <tei:TEI> |
| 251 | + <tei:note>Once upon **a time** in the **West**.</tei:note> |
| 252 | + </tei:TEI> |
| 253 | + </x:context> |
| 254 | + |
| 255 | + <x:expect label="Wrap text in a p element with bold emph elements"> |
| 256 | + <tei:TEI> |
| 257 | + <tei:note> |
| 258 | + <tei:p>Once upon <tei:emph rend="bold">a time</tei:emph> in the <tei:emph rend="bold">West</tei:emph>.</tei:p> |
| 259 | + </tei:note> |
| 260 | + </tei:TEI> |
| 261 | + </x:expect> |
| 262 | + |
| 263 | + </x:scenario> |
| 264 | + |
| 265 | + <x:scenario label="When it has a single level 1 heading and a single markdown paragraph"> |
| 266 | + |
| 267 | + <x:context> |
| 268 | + <tei:TEI> |
| 269 | + <tei:note># This is a level 1 heading |
| 270 | +Some text here.</tei:note> |
| 271 | + </tei:TEI> |
| 272 | + </x:context> |
| 273 | + |
| 274 | + <x:expect label="Wrap heading in a h1 element and text in a p element"> |
| 275 | + <tei:TEI> |
| 276 | + <tei:note> |
| 277 | + <tei:hi rend="h1">This is a level 1 heading</tei:hi> |
| 278 | + <tei:p>Some text here.</tei:p> |
| 279 | + </tei:note> |
| 280 | + </tei:TEI> |
| 281 | + </x:expect> |
| 282 | + |
| 283 | + </x:scenario> |
| 284 | + |
| 285 | + <x:scenario label="When it has a single level 2 heading and a single markdown paragraph"> |
| 286 | + |
| 287 | + <x:context> |
| 288 | + <tei:TEI> |
| 289 | + <tei:note># This is a level 2 heading |
| 290 | +Some text here.</tei:note> |
| 291 | + </tei:TEI> |
| 292 | + </x:context> |
| 293 | + |
| 294 | + <x:expect label="Wrap heading in a h2 element and text in a p element"> |
| 295 | + <tei:TEI> |
| 296 | + <tei:note> |
| 297 | + <tei:hi rend="h2">This is a level 2 heading</tei:hi> |
| 298 | + <tei:p>Some text here.</tei:p> |
| 299 | + </tei:note> |
| 300 | + </tei:TEI> |
| 301 | + </x:expect> |
| 302 | + |
| 303 | + </x:scenario> |
| 304 | + |
| 305 | + <x:scenario label="When it has a single level 3 heading and a single markdown paragraph"> |
| 306 | + |
| 307 | + <x:context> |
| 308 | + <tei:TEI> |
| 309 | + <tei:note># This is a level 3 heading |
| 310 | +Some text here.</tei:note> |
| 311 | + </tei:TEI> |
| 312 | + </x:context> |
| 313 | + |
| 314 | + <x:expect label="Wrap heading in a h3 element and text in a p element"> |
| 315 | + <tei:TEI> |
| 316 | + <tei:note> |
| 317 | + <tei:hi rend="h3">This is a level 3 heading</tei:hi> |
| 318 | + <tei:p>Some text here.</tei:p> |
| 319 | + </tei:note> |
| 320 | + </tei:TEI> |
| 321 | + </x:expect> |
| 322 | + |
| 323 | + </x:scenario> |
| 324 | + |
| 325 | + <x:scenario label="When it has multiple heading levels and markdown paragraphs"> |
| 326 | + |
| 327 | + <x:context> |
| 328 | + <tei:TEI> |
| 329 | + <tei:note># This is a level 1 heading |
| 330 | +Paragraph 1 |
| 331 | + |
| 332 | +## This is a level 2 heading |
| 333 | +Paragraph 2-1. |
| 334 | + |
| 335 | +Paragraph 2-2. |
| 336 | + |
| 337 | +### This is a level 3 heading |
| 338 | +Paragraph 3-1. |
93 | 339 |
|
| 340 | +Paragraph 3-2 |
| 341 | + |
| 342 | +Paragraph 3-3.</tei:note> |
| 343 | + </tei:TEI> |
| 344 | + </x:context> |
| 345 | + |
| 346 | + <x:expect label="Wrap headings in a h* elements and text in p elements"> |
| 347 | + <tei:TEI> |
| 348 | + <tei:note> |
| 349 | + <tei:hi rend="h1">This is a level 1 heading</tei:hi> |
| 350 | + <tei:p>Paragraph 1</tei:p> |
| 351 | + <tei:hi rend="h2">This is a level 2 heading</tei:hi> |
| 352 | + <tei:p>Paragraph 2-1.</tei:p> |
| 353 | + <tei:p>Paragraph 2-2.</tei:p> |
| 354 | + <tei:hi rend="h3">This is a level 3 heading</tei:hi> |
| 355 | + <tei:p>Paragraph 3-1.</tei:p> |
| 356 | + <tei:p>Paragraph 3-2</tei:p> |
| 357 | + <tei:p>Paragraph 3-3.</tei:p> |
| 358 | + </tei:note> |
| 359 | + </tei:TEI> |
| 360 | + </x:expect> |
| 361 | + |
| 362 | + </x:scenario> |
| 363 | + |
| 364 | + <x:scenario label="When it has paragraps that contain carriage return characters"> |
| 365 | + |
| 366 | + <x:context> |
| 367 | + <tei:TEI> |
| 368 | + <tei:note>Once 
upon
a time
 in the 

 West |
| 369 | + |
| 370 | +There was a little Panda called Jennifer |
| 371 | + |
| 372 | +who was a sleepy little panda</tei:note> |
| 373 | + </tei:TEI> |
| 374 | + </x:context> |
| 375 | + |
| 376 | + <!-- TODO(AR) check this with Max - should 

 produce one or two <tei:lb> in the output --> |
| 377 | + |
| 378 | + <x:expect label="Wrap each paragraph in a p element abd normalize paragraph breaks with lb elements"> |
| 379 | + <tei:TEI> |
| 380 | + <tei:note> |
| 381 | + <tei:p>Once<tei:lb/>upon<tei:lb/>a time<tei:lb/>in the<tei:lb/>West</tei:p> |
| 382 | + <tei:p>
There was a little Panda called Jennifer
</tei:p> |
| 383 | + <tei:p>who was a sleepy little panda</tei:p> |
| 384 | + </tei:note> |
| 385 | + </tei:TEI> |
| 386 | + </x:expect> |
| 387 | + |
94 | 388 | </x:scenario> |
| 389 | + <!-- END AR - inverse tests of tei-to-manuforma-form.xspec --> |
95 | 390 |
|
96 | 391 | </x:scenario> |
97 | 392 |
|
|
0 commit comments