ae37fa0464
Our TAP output was delivering messages as comments before the test line, where TAP clearly expects the details of a test to follow its test line. Version 13 provides a YAML block to deliver diagnostics and encourages use of this, so accumulate our messages in a QTestCharBuffer instead of emitting them one by one. However, messages produced after a test has produced its test line belong to that test, but are too late to be included in its diagnostics block, so should be emitted immediately as before, albeit now with a type prefix. This at least separates such messages, from the end of one test, from messages produced early in the next. In the process, add a type-prefix to each, to make clear what type of message it was. Since the Yamlish supported by TAP consumers doesn't support a way to have many messages, use the extensions: top-level hash tag with a messages: sub-tag to gather our messages as a list. (This expands at least one expected output file significantly and substantially rewrites some others.) Add methods to QTestCharBuffer, and a helper function, to support this. Task-number: QTBUG-96844 Change-Id: If44a33da5879ed1670ef0980042599afd516f9d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
19 lines
375 B
Plaintext
19 lines
375 B
Plaintext
TAP version 13
|
|
# tst_Skip
|
|
ok 1 - initTestCase()
|
|
ok 2 - test() # SKIP skipping all
|
|
ok 3 - emptytest() # SKIP skipping all
|
|
ok 4 - singleSkip(local 1) # SKIP skipping one
|
|
ok 5 - singleSkip(local 2)
|
|
---
|
|
extensions:
|
|
messages:
|
|
- severity: debug
|
|
message: this line should only be reached once (true)
|
|
...
|
|
ok 6 - cleanupTestCase()
|
|
1..6
|
|
# tests 6
|
|
# pass 3
|
|
# fail 0
|