Path:
tests/integration/features/source_code_traceability/_source_nodes/34_merge_with_sdoc_field_priority/test.itest
Lines:
37
Non-empty lines:
30
Non-empty lines covered with requirements:
30 / 30 (100.0%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
#
2
# This test verifies field priority when a static sdoc stub is merged with a
3
# source node. One document, four REQUIREMENT/function pairs, one scenario
4
# each, to avoid four separate export runs:
5
#
6
# - example_title_fallback: neither side has TITLE -> falls back to the
7
# parser-suggested entity name.
8
# - example_title_static_wins: stub has a static TITLE, source has none ->
9
# the static TITLE is kept, not replaced by the entity name.
10
# - example_field_source_overrides_stub: both sides have a DETAIL value ->
11
# the source-parsed value wins.
12
# - example_field_preserved_when_absent_in_source: stub has a DETAIL value,
13
# source has none -> the stub value is kept untouched.
14
#
15
# @relation(SDOC-SRS-141, scope=file)
16
#
17
18
RUN: %strictdoc --debug export %S --output-dir %T | filecheck %s
19
20
CHECK: Export to HTML: Requirements from Source Nodes
21
22
RUN: %cat %T/html/%THIS_TEST_FOLDER/source_node_base.html | filecheck %s --check-prefix CHECK-HTML
23
24
CHECK-HTML: <sdoc-node-title
25
CHECK-HTML: example_title_fallback</sdoc-autogen>
26
27
CHECK-HTML: <sdoc-node-title
28
CHECK-HTML: Static Title</sdoc-autogen>
29
30
CHECK-HTML: <sdoc-node-title
31
CHECK-HTML: Static Title</sdoc-autogen>
32
CHECK-HTML: detail from source (wins over stub)
33
CHECK-HTML-NOT: Stub detail (should be overridden)
34
35
CHECK-HTML: <sdoc-node-title
36
CHECK-HTML: Static Title</sdoc-autogen>
37
CHECK-HTML: Stub detail (should be preserved)