| index da5757f..2fd1edf 100755 | | index da5757f..2fd1edf 100755 |
| --- a/tests/run.sh | | --- a/tests/run.sh |
| +++ b/tests/run.sh | | +++ b/tests/run.sh |
| @@ -333,6 +333,13 @@ check_not "source never calls system()" 'system(' "$SRCCAT" | | @@ -333,6 +333,13 @@ check_not "source never calls system()" 'system(' "$SRCCAT" |
| 333 | check "journal argv is built with snprintf" 'journalctl -o json --no-pager' "$SRCCAT" | 333 | check "journal argv is built with snprintf" 'journalctl -o json --no-pager' "$SRCCAT" |
| 334 | check "macOS log is called by absolute path" '/usr/bin/log show --style compact' "$SRCCAT" | 334 | check "macOS log is called by absolute path" '/usr/bin/log show --style compact' "$SRCCAT" |
| 335 | check "wevtutil argv names the channel" 'wevtutil qe %s /c:%d /rd:true /f:text' "$SRCCAT" | 335 | check "wevtutil argv names the channel" 'wevtutil qe %s /c:%d /rd:true /f:text' "$SRCCAT" |
| | 336 | +# the journal kind means journalctl on Linux and `log show` on macOS, so the |
| | 337 | +# platform branch must come BEFORE the generic kind check in both collectors |
| | 338 | +check "platform branch precedes the journalctl branch" \ |
| | 339 | + 'if defined(__APPLE__) |
| | 340 | + if (strcmp(s->kind, "journal") == 0)' "$(printf '%s' "$SRCCAT" | sed -n '/static int collect_tail/,/^}/p')" |
| | 341 | +check "search collector dispatches by platform too" \ |
| | 342 | + '/usr/bin/log show' "$SRCCAT" |
| 336 | check "unit names are validated" 'valid_unit' "$SRCCAT" | 343 | check "unit names are validated" 'valid_unit' "$SRCCAT" |
| 337 | check "files are opened read-only" '"rb"' "$SRCCAT" | 344 | check "files are opened read-only" '"rb"' "$SRCCAT" |
| 338 | check "tail reads are bounded" 'FILE_TAIL_BYTES' "$SRCCAT" | 345 | check "tail reads are bounded" 'FILE_TAIL_BYTES' "$SRCCAT" |
| 339 | | 346 | |