diff --git a/tests/integration/syntax/composite/invalid/sample.sdoc b/tests/integration/syntax/composite/invalid/sample.sdoc new file mode 100644 index 0000000..6bc3935 --- /dev/null +++ b/tests/integration/syntax/composite/invalid/sample.sdoc @@ -0,0 +1,14 @@ +[DOCUMENT] +TITLE: Document with invalid examples + +[[DOCUMENT]] + +[[/DOCUMENT]] + +[[GRAMMAR]] + +[[/GRAMMAR]] + +[[DOCUMENT_FROM_FILE]] + +[[/DOCUMENT_FROM_FILE]] diff --git a/tests/integration/syntax/composite/invalid/test.itest b/tests/integration/syntax/composite/invalid/test.itest new file mode 100644 index 0000000..5864be5 --- /dev/null +++ b/tests/integration/syntax/composite/invalid/test.itest @@ -0,0 +1,19 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [1:0-10] "[DOCUMENT]" → source.sdoc keyword.sdoc +CHECK: [2:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc +CHECK: [2:5-7] ": " → source.sdoc keyword.control.sdoc +CHECK: [2:7-38] "Document with invalid examples" → source.sdoc keyword.control.sdoc string.sdoc +CHECK: [3:0-1] "" → source.sdoc +CHECK: [4:0-12] "[[DOCUMENT]]" → source.sdoc invalid.illegal.sdoc +CHECK: [5:0-1] "" → source.sdoc +CHECK: [6:0-13] "[[/DOCUMENT]]" → source.sdoc invalid.illegal.sdoc +CHECK: [7:0-1] "" → source.sdoc +CHECK: [8:0-11] "[[GRAMMAR]]" → source.sdoc invalid.illegal.sdoc +CHECK: [9:0-1] "" → source.sdoc +CHECK: [10:0-12] "[[/GRAMMAR]]" → source.sdoc invalid.illegal.sdoc +CHECK: [11:0-1] "" → source.sdoc +CHECK: [12:0-22] "[[DOCUMENT_FROM_FILE]]" → source.sdoc invalid.illegal.sdoc +CHECK: [13:0-1] "" → source.sdoc +CHECK: [14:0-23] "[[/DOCUMENT_FROM_FILE]]" → source.sdoc invalid.illegal.sdoc +CHECK: [15:0-1] "" → source.sdoc diff --git a/tests/integration/syntax/composite/section/sample.sdoc b/tests/integration/syntax/composite/section/sample.sdoc new file mode 100644 index 0000000..8ff2723 --- /dev/null +++ b/tests/integration/syntax/composite/section/sample.sdoc @@ -0,0 +1,7 @@ +[DOCUMENT] +TITLE: Document with composite SECTION + +[[SECTION]] +TITLE: Valid section + +[[/SECTION]] diff --git a/tests/integration/syntax/section_composite/test.itest b/tests/integration/syntax/composite/section/test.itest similarity index 51% rename from tests/integration/syntax/section_composite/test.itest rename to tests/integration/syntax/composite/section/test.itest index 4713fb8..30e6059 100644 --- a/tests/integration/syntax/section_composite/test.itest +++ b/tests/integration/syntax/composite/section/test.itest @@ -1,9 +1,14 @@ RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail +CHECK: [1:0-10] "[DOCUMENT]" → source.sdoc keyword.sdoc +CHECK: [2:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc +CHECK: [2:5-7] ": " → source.sdoc keyword.control.sdoc +CHECK: [2:7-39] "Document with composite SECTION" → source.sdoc keyword.control.sdoc string.sdoc +CHECK: [3:0-1] "" → source.sdoc CHECK: [4:0-11] "[[SECTION]]" → source.sdoc keyword.sdoc CHECK: [5:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc CHECK: [5:5-7] ": " → source.sdoc keyword.control.sdoc -CHECK: [5:7-21] "Right section" → source.sdoc keyword.control.sdoc string.sdoc +CHECK: [5:7-21] "Valid section" → source.sdoc keyword.control.sdoc string.sdoc CHECK: [6:0-1] "" → source.sdoc CHECK: [7:0-12] "[[/SECTION]]" → source.sdoc keyword.sdoc CHECK: [8:0-1] "" → source.sdoc diff --git a/tests/integration/syntax/composite/valid/sample.sdoc b/tests/integration/syntax/composite/valid/sample.sdoc new file mode 100644 index 0000000..d8c29f8 --- /dev/null +++ b/tests/integration/syntax/composite/valid/sample.sdoc @@ -0,0 +1,12 @@ +[DOCUMENT] +TITLE: Document with valid composite examples + +[[SECTION]] +TITLE: Valid section + +[[/SECTION]] + +[[ANY_NAME]] +TITLE: Composite node + +[[/ANY_NAME]] diff --git a/tests/integration/syntax/composite/valid/test.itest b/tests/integration/syntax/composite/valid/test.itest new file mode 100644 index 0000000..3831391 --- /dev/null +++ b/tests/integration/syntax/composite/valid/test.itest @@ -0,0 +1,21 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [1:0-10] "[DOCUMENT]" → source.sdoc keyword.sdoc +CHECK: [2:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc +CHECK: [2:5-7] ": " → source.sdoc keyword.control.sdoc +CHECK: [2:7-46] "Document with valid composite examples" → source.sdoc keyword.control.sdoc string.sdoc +CHECK: [3:0-1] "" → source.sdoc +CHECK: [4:0-11] "[[SECTION]]" → source.sdoc keyword.sdoc +CHECK: [5:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc +CHECK: [5:5-7] ": " → source.sdoc keyword.control.sdoc +CHECK: [5:7-21] "Valid section" → source.sdoc keyword.control.sdoc string.sdoc +CHECK: [6:0-1] "" → source.sdoc +CHECK: [7:0-12] "[[/SECTION]]" → source.sdoc keyword.sdoc +CHECK: [8:0-1] "" → source.sdoc +CHECK: [9:0-12] "[[ANY_NAME]]" → source.sdoc keyword.sdoc +CHECK: [10:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc +CHECK: [10:5-7] ": " → source.sdoc keyword.control.sdoc +CHECK: [10:7-22] "Composite node" → source.sdoc keyword.control.sdoc string.sdoc +CHECK: [11:0-1] "" → source.sdoc +CHECK: [12:0-13] "[[/ANY_NAME]]" → source.sdoc keyword.sdoc +CHECK: [13:0-1] "" → source.sdoc diff --git a/tests/integration/syntax/deprecated/closing_non_composite_tag/sample.sdoc b/tests/integration/syntax/deprecated/closing_non_composite_tag/sample.sdoc new file mode 100644 index 0000000..191b180 --- /dev/null +++ b/tests/integration/syntax/deprecated/closing_non_composite_tag/sample.sdoc @@ -0,0 +1,7 @@ +[DOCUMENT] +TITLE: Document + +[COMPOSITE_REQUIREMENT] +STATEMENT: This tag name is possible, but will not create a composite node. + +[/COMPOSITE_REQUIREMENT] diff --git a/tests/integration/syntax/deprecated/closing_non_composite_tag/test.itest b/tests/integration/syntax/deprecated/closing_non_composite_tag/test.itest new file mode 100644 index 0000000..2c1f8d2 --- /dev/null +++ b/tests/integration/syntax/deprecated/closing_non_composite_tag/test.itest @@ -0,0 +1,5 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [4:0-23] "[COMPOSITE_REQUIREMENT]" → source.sdoc keyword.sdoc +CHECK: [5:11-74] "This tag name is possible, but will not create a composite node" → source.sdoc string.unquoted +CHECK: [7:0-24] "[/COMPOSITE_REQUIREMENT]" → source.sdoc invalid.illegal.sdoc diff --git a/tests/integration/syntax/deprecated/document_options/sample.sdoc b/tests/integration/syntax/deprecated/document_options/sample.sdoc new file mode 100644 index 0000000..0b46620 --- /dev/null +++ b/tests/integration/syntax/deprecated/document_options/sample.sdoc @@ -0,0 +1,6 @@ +[DOCUMENT] +TITLE: Document with deprecated REQ_PREFIX, REQUIREMENT_STYLE, REQUIREMENT_IN_TOC +REQ_PREFIX: _DEPRECATED_ +OPTIONS: + REQUIREMENT_STYLE: Inline + REQUIREMENT_IN_TOC: True diff --git a/tests/integration/syntax/deprecated/document_options/test.itest b/tests/integration/syntax/deprecated/document_options/test.itest new file mode 100644 index 0000000..1d3e735 --- /dev/null +++ b/tests/integration/syntax/deprecated/document_options/test.itest @@ -0,0 +1,6 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [3:0-10] "REQ_PREFIX" → source.sdoc keyword.control.sdoc invalid.deprecated.sdoc +CHECK: [4:0-8] "OPTIONS:" → source.sdoc keyword.control.sdoc +CHECK: [5:0-20] " REQUIREMENT_STYLE:" → source.sdoc invalid.deprecated.sdoc +CHECK: [6:0-21] " REQUIREMENT_IN_TOC:" → source.sdoc invalid.deprecated.sdoc diff --git a/tests/integration/syntax/deprecated/grammar_type_reference_choice/sample.sdoc b/tests/integration/syntax/deprecated/grammar_type_reference_choice/sample.sdoc new file mode 100644 index 0000000..1a6d7f9 --- /dev/null +++ b/tests/integration/syntax/deprecated/grammar_type_reference_choice/sample.sdoc @@ -0,0 +1,13 @@ +[DOCUMENT] +TITLE: Deprecated ParentReqReference, FileReference, BibReference + +[GRAMMAR] +ELEMENTS: +- TAG: DEPRECATED_TYPE_REF_CHOICES + FIELDS: + - TITLE: DEPRECATED_1 + TYPE: ParentReqReference + - TITLE: DEPRECATED_2 + TYPE: FileReference + - TITLE: DEPRECATED_3 + TYPE: BibReference diff --git a/tests/integration/syntax/deprecated/grammar_type_reference_choice/test.itest b/tests/integration/syntax/deprecated/grammar_type_reference_choice/test.itest new file mode 100644 index 0000000..b525efa --- /dev/null +++ b/tests/integration/syntax/deprecated/grammar_type_reference_choice/test.itest @@ -0,0 +1,5 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [9:10-28] "ParentReqReference" → source.sdoc invalid.deprecated +CHECK: [11:10-23] "FileReference" → source.sdoc invalid.deprecated +CHECK: [13:10-22] "BibReference" → source.sdoc invalid.deprecated diff --git a/tests/integration/syntax/deprecated/refs/sample.sdoc b/tests/integration/syntax/deprecated/refs/sample.sdoc new file mode 100644 index 0000000..c10ac2a --- /dev/null +++ b/tests/integration/syntax/deprecated/refs/sample.sdoc @@ -0,0 +1,8 @@ +[DOCUMENT] +TITLE: Deprecated REFS + +[REQUIREMENT] +TITLE: Node with deprecated REFS tag +REFS: +- TYPE: File + VALUE: examples/example_source_files/file2.py diff --git a/tests/integration/syntax/deprecated/refs/test.itest b/tests/integration/syntax/deprecated/refs/test.itest new file mode 100644 index 0000000..e6bb80e --- /dev/null +++ b/tests/integration/syntax/deprecated/refs/test.itest @@ -0,0 +1,3 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [6:0-6] "REFS:" → source.sdoc invalid.deprecated.sdoc diff --git a/tests/integration/syntax/deprecated/section/sample.sdoc b/tests/integration/syntax/deprecated/section/sample.sdoc new file mode 100644 index 0000000..05c59ef --- /dev/null +++ b/tests/integration/syntax/deprecated/section/sample.sdoc @@ -0,0 +1,7 @@ +[DOCUMENT] +TITLE: Deprecated composite section + +[SECTION] +TITLE: DEPRECATED SECTION TAG + +[/SECTION] diff --git a/tests/integration/syntax/deprecated/section/test.itest b/tests/integration/syntax/deprecated/section/test.itest new file mode 100644 index 0000000..499f3f1 --- /dev/null +++ b/tests/integration/syntax/deprecated/section/test.itest @@ -0,0 +1,4 @@ +RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail + +CHECK: [4:0-9] "[SECTION]" → source.sdoc invalid.deprecated.sdoc +CHECK: [7:0-10] "[/SECTION]" → source.sdoc invalid.deprecated.sdoc diff --git a/tests/integration/syntax/section_composite/sample.sdoc b/tests/integration/syntax/section_composite/sample.sdoc deleted file mode 100644 index 92997db..0000000 --- a/tests/integration/syntax/section_composite/sample.sdoc +++ /dev/null @@ -1,7 +0,0 @@ -[DOCUMENT] -TITLE: Document Title - -[[SECTION]] -TITLE: Right section - -[[/SECTION]] diff --git a/tests/integration/syntax/section_deprecated/sample.sdoc b/tests/integration/syntax/section_deprecated/sample.sdoc deleted file mode 100644 index 670ae80..0000000 --- a/tests/integration/syntax/section_deprecated/sample.sdoc +++ /dev/null @@ -1,7 +0,0 @@ -[DOCUMENT] -TITLE: Document Title - -[SECTION] -TITLE: Wrong section - -[/SECTION] diff --git a/tests/integration/syntax/section_deprecated/test.itest b/tests/integration/syntax/section_deprecated/test.itest deleted file mode 100644 index 3d9339a..0000000 --- a/tests/integration/syntax/section_deprecated/test.itest +++ /dev/null @@ -1,9 +0,0 @@ -RUN: %parse_syntax %S/sample.sdoc | filecheck %s --dump-input=fail - -CHECK: [4:0-9] "[SECTION]" → source.sdoc invalid.deprecated.sdoc -CHECK: [5:0-5] "TITLE" → source.sdoc keyword.control.sdoc keyword.control.sdoc -CHECK: [5:5-7] ": " → source.sdoc keyword.control.sdoc -CHECK: [5:7-21] "Wrong section" → source.sdoc keyword.control.sdoc string.sdoc -CHECK: [6:0-1] "" → source.sdoc -CHECK: [7:0-10] "[/SECTION]" → source.sdoc invalid.deprecated.sdoc -CHECK: [8:0-1] "" → source.sdoc