Path:
tests/integration/features/source_code_traceability/_source_nodes/31_merge_with_sdoc_by_uid/test.itest
Lines:
58
Non-empty lines:
50
Non-empty lines covered with requirements:
50 / 50 (100.0%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
#
2
# This test verifies that a source nodes is merged with a static SDoc node with same explicit UID annotated.
3
# The following cases shall be handled:
4
# - If MID is set at neither side, a random (but hidden) automatic MID is assigned by StrictDoc.
5
# - If MID is set only at the sdoc side, the MID remains effective.
6
# - If MID is set only at the source side, early random automatic MID is overwritten by source side MID.
7
#
8
# Cases tested elsewhere:
9
# - If MID is set on both sides and is equal, this is considered "merge by mid".
10
# - If MID is set on both sides but is different, this is considered a validation error.
11
#
12
# @relation(SDOC-SRS-141, scope=file)
13
#
14
15
RUN: %strictdoc --debug export %S --output-dir %T | filecheck %s
16
17
CHECK: Export to HTML: Hello world doc
18
19
RUN: %check_exists --file "%T/html/_source_files/src/example.c.html"
20
21
RUN: %cat %T/html/%THIS_TEST_FOLDER/source_node_base.html | filecheck %s --check-prefix CHECK-HTML
22
CHECK-HTML: Requirements from Source Nodes
23
CHECK-HTML-NOT: SRC-NODES-BASE/src/example.c/example_1
24
CHECK-HTML: REQ-SOURCE-1
25
CHECK-HTML: TITLE1 from sdoc
26
CHECK-HTML: src/example.c, <i>lines: 3-16</i>, function example_1()
27
CHECK-HTML-NOT: FOO1 text from sdoc
28
CHECK-HTML: FOO1 text from example.c
29
CHECK-HTML-NOT: BAR1 text from sdoc
30
CHECK-HTML: BAR1 text from example.c
31
32
CHECK-HTML-NOT: SRC-NODES-BASE/src/example.c/example_2
33
CHECK-HTML: REQ-SOURCE-2
34
CHECK-HTML: TITLE2 from sdoc
35
CHECK-HTML: src/example.c, <i>lines: 18-31</i>, function example_2()
36
CHECK-HTML-NOT: FOO2 text from sdoc
37
CHECK-HTML: FOO2 text from example.c
38
CHECK-HTML-NOT: BAR2 text from sdoc
39
CHECK-HTML: BAR2 text from example.c
40
41
CHECK-HTML-NOT: SRC-NODES-BASE/src/example.c/example_3
42
CHECK-HTML: REQ-SOURCE-3
43
CHECK-HTML: TITLE3 from sdoc
44
CHECK-HTML: 1973a567-a109-491d-b7f0-6bb22eafa6ab
45
CHECK-HTML: src/example.c, <i>lines: 33-48</i>, function example_3()
46
CHECK-HTML-NOT: FOO3 text from sdoc
47
CHECK-HTML: FOO3 text from example.c
48
CHECK-HTML-NOT: BAR3 text from sdoc
49
CHECK-HTML: BAR3 text from example.c
50
51
RUN: %cat %T/html/_source_files/src/example.c.html | filecheck %s --check-prefix CHECK-SOURCE-FILE
52
CHECK-HTML-NOT: SRC-NODES-BASE/src/example.c/example_1
53
CHECK-SOURCE-FILE: REQ-SOURCE-1
54
CHECK-SOURCE-FILE: REQ-SOURCE-2
55
CHECK-SOURCE-FILE: REQ-SOURCE-3
56
57
RUN: %cat %T/html/source_coverage.html | filecheck %s --check-prefix CHECK-SOURCE-COVERAGE
58
CHECK-SOURCE-COVERAGE: 100.0