StrictDoc Documentation
tests/integration/features/source_code_traceability/_source_nodes/_auto_uuid/10_linux_spdx_req_id_autogen/test.itest
Source file coverage
Path:
tests/integration/features/source_code_traceability/_source_nodes/_auto_uuid/10_linux_spdx_req_id_autogen/test.itest
Lines:
42
Non-empty lines:
37
Non-empty lines covered with requirements:
37 / 37 (100.0%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
#
2
# @relation(SDOC-SRS-141, scope=file)
3
#
4
RUN: cp -r %S/* %T/
5
RUN: cd %T/
6
RUN: %strictdoc --debug manage auto-uid %T | filecheck %s
7
 
8
CHECK: Reading source: src{{.}}example{{.}}example.c
9
CHECK: Total execution time
10
 
11
#
12
# The output requirements file only contains the change in two fields with
13
# nothing else affected.
14
# The regular expression is used to verify that the field is indeed SHA256.
15
#
16
RUN: %expect_exit 1 %diff %S/requirements.sdoc %T/requirements.sdoc | filecheck %s --check-prefix CHECK-DIFF
17
CHECK-DIFF:      < MID: TBD
18
CHECK-DIFF-NEXT: < HASH: TBD
19
CHECK-DIFF-NEXT: ---
20
CHECK-DIFF-NEXT: > MID: {{[a-f0-9]{64}}}
21
CHECK-DIFF-NEXT: > HASH: dee51cd1dc666a6d1b2678c27c2b6dfc85376107e403963a8afc83acb62ff944
22
 
23
#
24
# The output requirements file only contains the change in two fields with
25
# nothing else affected.
26
# The regular expression is used to verify that the field is indeed SHA256.
27
#
28
RUN: %expect_exit 1 %diff %S/tests.sdoc %T/tests.sdoc | filecheck %s --check-prefix CHECK-DIFF-TESTS
29
CHECK-DIFF-TESTS:      <   VALUE: TBD
30
CHECK-DIFF-TESTS-NEXT: ---
31
CHECK-DIFF-TESTS-NEXT: >   VALUE: {{[a-f0-9]{64}}}
32
 
33
#
34
# Source file with SPDX fields gets a stable hash generated.
35
#
36
RUN: cat %T/src/example/example.c | filecheck %s --check-prefix CHECK-SOURCE-FILE
37
CHECK-SOURCE-FILE: SPDX-Req-ID: {{[a-f0-9]{64}}}
38
 
39
#
40
# File without SPDX fields is not modified in any way.
41
#
42
RUN: %diff %S/src/example/example_no_spdx.c %T/src/example/example_no_spdx.c