forked from strictdoc-project/strictdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request strictdoc-project#1458 from strictdoc-project/stan…
…islaw/query project_config: "source_root_path" parameter to indicate the files root
- Loading branch information
Showing
19 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...egration/commands/export/html/file_traceability/30_path_to_source_files_option/input.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[DOCUMENT] | ||
TITLE: Hello world doc | ||
|
||
[REQUIREMENT] | ||
UID: REQ-001 | ||
REFS: | ||
- TYPE: File | ||
VALUE: file.py | ||
TITLE: Requirement Title | ||
STATEMENT: Requirement Statement |
2 changes: 2 additions & 0 deletions
2
...commands/export/html/file_traceability/30_path_to_source_files_option/source_root/file.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def hello_world(): | ||
print("hello world") # noqa: T201 |
7 changes: 7 additions & 0 deletions
7
...tion/commands/export/html/file_traceability/30_path_to_source_files_option/strictdoc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[project] | ||
|
||
features = [ | ||
"REQUIREMENT_TO_SOURCE_TRACEABILITY", | ||
] | ||
|
||
source_root_path = "source_root/" |
11 changes: 11 additions & 0 deletions
11
...egration/commands/export/html/file_traceability/30_path_to_source_files_option/test.itest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUN: %strictdoc export %S --experimental-enable-file-traceability --output-dir Output | filecheck %s --dump-input=fail | ||
CHECK: Published: Hello world doc | ||
|
||
RUN: %check_exists --file "%S/Output/html/_source_files/file.py.html" | ||
|
||
RUN: %cat %S/Output/html/30_path_to_source_files_option/input.html | filecheck %s --dump-input=fail --check-prefix CHECK-HTML | ||
CHECK-HTML: <a{{.*}}href="../_source_files/file.py.html#REQ-001"> | ||
|
||
RUN: %cat %S/Output/html/_source_files/file.py.html | filecheck %s --dump-input=fail --check-prefix CHECK-SOURCE-FILE | ||
CHECK-SOURCE-FILE: <a{{.*}}href="../30_path_to_source_files_option/input.html#1-REQ-001"{{.*}}> | ||
CHECK-SOURCE-FILE: <span class="c1"># noqa: T201</span></pre> |
10 changes: 10 additions & 0 deletions
10
...nds/export/html/file_traceability/31_relative_path_to_source_files_option/root/input.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[DOCUMENT] | ||
TITLE: Hello world doc | ||
|
||
[REQUIREMENT] | ||
UID: REQ-001 | ||
REFS: | ||
- TYPE: File | ||
VALUE: file.py | ||
TITLE: Requirement Title | ||
STATEMENT: Requirement Statement |
7 changes: 7 additions & 0 deletions
7
...export/html/file_traceability/31_relative_path_to_source_files_option/root/strictdoc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[project] | ||
|
||
features = [ | ||
"REQUIREMENT_TO_SOURCE_TRACEABILITY", | ||
] | ||
|
||
source_root_path = "../source_root/" |
2 changes: 2 additions & 0 deletions
2
...export/html/file_traceability/31_relative_path_to_source_files_option/source_root/file.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def hello_world(): | ||
print("hello world") # noqa: T201 |
11 changes: 11 additions & 0 deletions
11
...commands/export/html/file_traceability/31_relative_path_to_source_files_option/test.itest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUN: (cd %S/root && %strictdoc export %S/root --output-dir Output | filecheck %s --dump-input=fail) | ||
CHECK: Published: Hello world doc | ||
|
||
RUN: %check_exists --file "%S/root/Output/html/_source_files/file.py.html" | ||
|
||
RUN: %cat %S/root/Output/html/root/input.html | filecheck %s --dump-input=fail --check-prefix CHECK-HTML | ||
CHECK-HTML: <a{{.*}}href="../_source_files/file.py.html#REQ-001"> | ||
|
||
RUN: %cat %S/root/Output/html/_source_files/file.py.html | filecheck %s --dump-input=fail --check-prefix CHECK-SOURCE-FILE | ||
CHECK-SOURCE-FILE: <a{{.*}}href="../root/input.html#1-REQ-001"{{.*}}> | ||
CHECK-SOURCE-FILE: <span class="c1"># noqa: T201</span></pre> |
10 changes: 10 additions & 0 deletions
10
.../commands/export/html/file_traceability/35_path_to_source_files_does_not_exist/input.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[DOCUMENT] | ||
TITLE: Hello world doc | ||
|
||
[REQUIREMENT] | ||
UID: REQ-001 | ||
REFS: | ||
- TYPE: File | ||
VALUE: file.py | ||
TITLE: Requirement Title | ||
STATEMENT: Requirement Statement |
2 changes: 2 additions & 0 deletions
2
.../export/html/file_traceability/35_path_to_source_files_does_not_exist/source_root/file.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def hello_world(): | ||
print("hello world") # noqa: T201 |
7 changes: 7 additions & 0 deletions
7
...mands/export/html/file_traceability/35_path_to_source_files_does_not_exist/strictdoc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[project] | ||
|
||
features = [ | ||
"REQUIREMENT_TO_SOURCE_TRACEABILITY", | ||
] | ||
|
||
source_root_path = "DOES_NOT_EXIST/" |
2 changes: 2 additions & 0 deletions
2
.../commands/export/html/file_traceability/35_path_to_source_files_does_not_exist/test.itest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
RUN: %expect_exit 1 %strictdoc export %S --experimental-enable-file-traceability --output-dir Output | filecheck %s --dump-input=fail | ||
CHECK: error: strictdoc.toml: 'source_root_path': Provided path does not exist: DOES_NOT_EXIST/. |
18 changes: 18 additions & 0 deletions
18
...commands/export/html/file_traceability/37_source_root_and_include_source_paths/input.sdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[DOCUMENT] | ||
TITLE: Hello world doc | ||
|
||
[FREETEXT] | ||
**Hello world** | ||
[/FREETEXT] | ||
|
||
[REQUIREMENT] | ||
UID: REQ-001 | ||
REFS: | ||
- TYPE: File | ||
VALUE: src1/test1.py | ||
|
||
[REQUIREMENT] | ||
UID: REQ-002 | ||
REFS: | ||
- TYPE: File | ||
VALUE: src2/test2.py |
2 changes: 2 additions & 0 deletions
2
.../html/file_traceability/37_source_root_and_include_source_paths/source_root/src1/test1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def hello(): | ||
print("Hello") # noqa: T201 |
2 changes: 2 additions & 0 deletions
2
.../html/file_traceability/37_source_root_and_include_source_paths/source_root/src2/test2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def hello(): | ||
print("Hello") # noqa: T201 |
11 changes: 11 additions & 0 deletions
11
...ands/export/html/file_traceability/37_source_root_and_include_source_paths/strictdoc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[project] | ||
|
||
include_source_paths = [ | ||
"src1/**" | ||
] | ||
|
||
features = [ | ||
"REQUIREMENT_TO_SOURCE_TRACEABILITY" | ||
] | ||
|
||
source_root_path = "source_root/" |
5 changes: 5 additions & 0 deletions
5
...commands/export/html/file_traceability/37_source_root_and_include_source_paths/test.itest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
RUN: %expect_exit 1 %strictdoc export %S --output-dir Output/ | filecheck %s --dump-input=fail | ||
|
||
# Expecting a error because the test2.py is filtered out by the | ||
# "include_source_paths" option. | ||
CHECK: error: Requirement REQ-002 references a file that does not exist: src2/test2.py |