zeek/testing/btest/doc/zeekygen/identifier_without_script.zeek
Christian Kreibich 9d89b1156c Add btest for Zeekygen docs extraction on identifiers defined by the Zeek core.
Mainly, this should not crash. :-) The baseline output file also should remain
empty, since Zeekygen's staleness test should conclude that it's sufficiently
fresh.
2024-05-03 12:22:42 -07:00

14 lines
672 B
Text

# @TEST-DOC: Regression test for Zeekygen with identifiers that Zeek establishes in-core, not via scripts.
#
# This used to segfault (see GH-3718) due to unprotected access to the
# declaring_script member in Zeekygen's IdentifierInfo class. The staleness
# check also requires an existing output file, newer than Zeek itself, to
# progress sufficiently into Zeekygen's Manager::IsUpToDate().
#
# @TEST-EXEC: touch test.rst
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b -X zeekygen.config %INPUT
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff test.rst
@TEST-START-FILE zeekygen.config
identifier Log::WRITER_ASCII test.rst
@TEST-END-FILE