From 6089f493ef16c85d2f3cf962d94716ef9a08e1cb Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Mon, 20 Oct 2025 23:02:30 +0200 Subject: [PATCH] chore(export/html): drop the legacy 'passthrough' command, migrate itests to export --formats=sdoc --- strictdoc/cli/cli_arg_parser.py | 4 - strictdoc/cli/command_parser_builder.py | 95 ------------------- strictdoc/cli/main.py | 7 +- .../00_basic_requirement_test/test.itest | 2 - .../test.itest | 2 - .../bypass/03_basic_document_test/test.itest | 2 - .../bypass/20_filter_requirements/test.itest | 4 - .../bypass/30_in_place_rewrite/test.itest | 4 - .../01_view_option_is_provided/test.itest | 2 +- .../test.itest | 2 +- .../test.itest | 2 +- .../test.itest | 2 +- .../00_basic_requirement_test/input.sdoc | 0 .../00_basic_requirement_test/test.itest | 2 + .../input.sdoc | 0 .../test.itest | 2 + .../03_basic_document_test/input.sdoc | 0 .../03_basic_document_test/test.itest | 2 + .../10_multiple_documents/input/input1.sdoc | 0 .../input/nested/input2.sdoc | 0 .../10_multiple_documents/test.itest | 2 +- .../expected/output.sdoc | 0 .../20_filter_requirements/input.sdoc | 0 .../20_filter_requirements/test.itest | 4 + .../30_in_place_rewrite/expected.sdoc | 0 .../30_in_place_rewrite/input.sdoc | 0 .../30_in_place_rewrite/test.itest | 4 + .../passthrough}/40_generate_mid/input.sdoc | 0 .../passthrough}/40_generate_mid/test.itest | 2 +- .../50_nested_document_from_file/input.sdoc | 0 .../nested/input2.sdoc | 0 .../nested/subnested/input3.sdoc | 0 .../50_nested_document_from_file/test.itest | 2 +- .../passthrough/01_hello_world/test.itest | 2 +- .../unit/strictdoc/cli/test_cli_arg_parser.py | 56 ----------- 35 files changed, 23 insertions(+), 183 deletions(-) delete mode 100644 tests/integration/features/commands/bypass/00_basic_requirement_test/test.itest delete mode 100644 tests/integration/features/commands/bypass/01_empty_document_with_freetext/test.itest delete mode 100644 tests/integration/features/commands/bypass/03_basic_document_test/test.itest delete mode 100644 tests/integration/features/commands/bypass/20_filter_requirements/test.itest delete mode 100644 tests/integration/features/commands/bypass/30_in_place_rewrite/test.itest rename tests/integration/features/{commands/bypass => sdoc/passthrough}/00_basic_requirement_test/input.sdoc (100%) create mode 100644 tests/integration/features/sdoc/passthrough/00_basic_requirement_test/test.itest rename tests/integration/features/{commands/bypass => sdoc/passthrough}/01_empty_document_with_freetext/input.sdoc (100%) create mode 100644 tests/integration/features/sdoc/passthrough/01_empty_document_with_freetext/test.itest rename tests/integration/features/{commands/bypass => sdoc/passthrough}/03_basic_document_test/input.sdoc (100%) create mode 100644 tests/integration/features/sdoc/passthrough/03_basic_document_test/test.itest rename tests/integration/features/{commands/bypass => sdoc/passthrough}/10_multiple_documents/input/input1.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/10_multiple_documents/input/nested/input2.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/10_multiple_documents/test.itest (60%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/20_filter_requirements/expected/output.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/20_filter_requirements/input.sdoc (100%) create mode 100644 tests/integration/features/sdoc/passthrough/20_filter_requirements/test.itest rename tests/integration/features/{commands/bypass => sdoc/passthrough}/30_in_place_rewrite/expected.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/30_in_place_rewrite/input.sdoc (100%) create mode 100644 tests/integration/features/sdoc/passthrough/30_in_place_rewrite/test.itest rename tests/integration/features/{commands/bypass => sdoc/passthrough}/40_generate_mid/input.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/40_generate_mid/test.itest (75%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/50_nested_document_from_file/input.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/50_nested_document_from_file/nested/input2.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/50_nested_document_from_file/nested/subnested/input3.sdoc (100%) rename tests/integration/features/{commands/bypass => sdoc/passthrough}/50_nested_document_from_file/test.itest (71%) diff --git a/strictdoc/cli/cli_arg_parser.py b/strictdoc/cli/cli_arg_parser.py index 8c12b8705..6cf4de48d 100644 --- a/strictdoc/cli/cli_arg_parser.py +++ b/strictdoc/cli/cli_arg_parser.py @@ -220,10 +220,6 @@ def is_debug_mode(self) -> bool: def is_about_command(self) -> bool: return str(self.args.command) == "about" - @property - def is_passthrough_command(self) -> bool: - return str(self.args.command) == "passthrough" - @property def is_export_command(self) -> bool: return str(self.args.command) == "export" diff --git a/strictdoc/cli/command_parser_builder.py b/strictdoc/cli/command_parser_builder.py index 62d166e20..4de379806 100644 --- a/strictdoc/cli/command_parser_builder.py +++ b/strictdoc/cli/command_parser_builder.py @@ -124,7 +124,6 @@ def build(self) -> SDocArgumentParser: self.add_manage_command(command_subparsers) self.add_import_command(command_subparsers) self.add_version_command(command_subparsers) - self.add_passthrough_command(command_subparsers) self.add_dump_command(command_subparsers) self.add_diff_command(command_subparsers) @@ -404,100 +403,6 @@ def add_version_command( formatter_class=formatter, ) - @staticmethod - def add_passthrough_command( - parent_command_parser: "argparse._SubParsersAction[SDocArgumentParser]", - ) -> None: - # Passthrough command is kept for backwards compatibility. It will - # internally be handled as export --formats sdoc. - command_parser_passthrough = parent_command_parser.add_parser( - "passthrough", - help="Read an SDoc file, then output it again. Deprecated, use " - "strictdoc export --formats sdoc instead.", - formatter_class=formatter, - ) - command_parser_passthrough.add_argument( - "input_paths", - type=str, - nargs="+", - help="One or more folders with *.sdoc files", - ) - command_parser_passthrough.add_argument( - "--output-dir", - type=str, - help="A directory where to output the SDoc files to.", - ) - # FIXME: --filter-requirements will be removed in 2026. - command_parser_passthrough.add_argument( - "--filter-nodes", - "--filter-requirements", - dest="filter_nodes", - type=str, - help="Filter which requirements will be exported.", - ) - command_parser_passthrough.add_argument( - "--view", - type=str, - help="Choose which view will be exported.", - ) - - # Hidden default values to make deprecated passthrough parser compatible - # with SDocArgsParser.get_export_config. - command_parser_passthrough.add_argument( - "--project-title", const=None, help=argparse.SUPPRESS - ) - command_parser_passthrough.add_argument( - "--formats", - default=["sdoc"], - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--fields", - default=None, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--generate-bundle-document", - default=False, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--no-parallelization", - default=False, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--enable-mathjax", - default=False, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--included-documents", - default=False, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--reqif-profile", - default=None, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--reqif-multiline-is-xhtml", - default=False, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--reqif-enable-mid", - default=False, - help=argparse.SUPPRESS, - ) - command_parser_passthrough.add_argument( - "--chromedriver", - default=None, - help=argparse.SUPPRESS, - ) - add_config_argument(command_parser_passthrough) - @staticmethod def add_dump_command( parent_command_parser: "argparse._SubParsersAction[SDocArgumentParser]", diff --git a/strictdoc/cli/main.py b/strictdoc/cli/main.py index ce1688037..b4815aaa3 100644 --- a/strictdoc/cli/main.py +++ b/strictdoc/cli/main.py @@ -49,12 +49,7 @@ def _main(parallelizer: Parallelizer, parser: SDocArgsParser) -> None: project_config: ProjectConfig - if parser.is_passthrough_command or parser.is_export_command: - if parser.is_passthrough_command: - print( # noqa: T201 - "warning: passthrough is deprecated, use strictdoc " - "export --formats sdoc instead." - ) + if parser.is_export_command: export_config: ExportCommandConfig = parser.get_export_config() try: export_config.validate() diff --git a/tests/integration/features/commands/bypass/00_basic_requirement_test/test.itest b/tests/integration/features/commands/bypass/00_basic_requirement_test/test.itest deleted file mode 100644 index 59a89015d..000000000 --- a/tests/integration/features/commands/bypass/00_basic_requirement_test/test.itest +++ /dev/null @@ -1,2 +0,0 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/input.sdoc --output-dir=%T/ -RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/01_empty_document_with_freetext/test.itest b/tests/integration/features/commands/bypass/01_empty_document_with_freetext/test.itest deleted file mode 100644 index 59a89015d..000000000 --- a/tests/integration/features/commands/bypass/01_empty_document_with_freetext/test.itest +++ /dev/null @@ -1,2 +0,0 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/input.sdoc --output-dir=%T/ -RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/03_basic_document_test/test.itest b/tests/integration/features/commands/bypass/03_basic_document_test/test.itest deleted file mode 100644 index 59a89015d..000000000 --- a/tests/integration/features/commands/bypass/03_basic_document_test/test.itest +++ /dev/null @@ -1,2 +0,0 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/input.sdoc --output-dir=%T/ -RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/20_filter_requirements/test.itest b/tests/integration/features/commands/bypass/20_filter_requirements/test.itest deleted file mode 100644 index 5eddfe1db..000000000 --- a/tests/integration/features/commands/bypass/20_filter_requirements/test.itest +++ /dev/null @@ -1,4 +0,0 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/input.sdoc --output-dir=%T --filter-requirements '("2" in node["TITLE"] or "4" in node["TITLE"])' | filecheck %s --dump-input=fail -CHECK: Reading SDOC: input.sdoc - -RUN: %diff %S/expected/output.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/30_in_place_rewrite/test.itest b/tests/integration/features/commands/bypass/30_in_place_rewrite/test.itest deleted file mode 100644 index 2f3cec6c1..000000000 --- a/tests/integration/features/commands/bypass/30_in_place_rewrite/test.itest +++ /dev/null @@ -1,4 +0,0 @@ -RUN: mkdir %T/sandbox -RUN: cp %S/input.sdoc %T/sandbox/ -RUN: %expect_exit 0 %strictdoc passthrough %T/sandbox/input.sdoc --output-dir=%T/sandbox --filter-requirements='"2" not in node["TITLE"]' -RUN: %diff %S/expected.sdoc %T/sandbox/sdoc/input.sdoc diff --git a/tests/integration/features/commands/passthrough/--view/01_view_option_is_provided/test.itest b/tests/integration/features/commands/passthrough/--view/01_view_option_is_provided/test.itest index ec2fe29b6..7e8596933 100644 --- a/tests/integration/features/commands/passthrough/--view/01_view_option_is_provided/test.itest +++ b/tests/integration/features/commands/passthrough/--view/01_view_option_is_provided/test.itest @@ -1,4 +1,4 @@ -RUN: %strictdoc passthrough %S --view PRINT_VIEW --output-dir %T +RUN: %strictdoc export %S --formats=sdoc --view PRINT_VIEW --output-dir %T RUN: %cat %T/sdoc/input.sdoc | filecheck %s --check-prefix CHECK-SDOC CHECK-SDOC: REQ-1 diff --git a/tests/integration/features/commands/passthrough/--view/02_if_view_option_is_not_provided_then_default_view/test.itest b/tests/integration/features/commands/passthrough/--view/02_if_view_option_is_not_provided_then_default_view/test.itest index f00086b60..da4509ce2 100644 --- a/tests/integration/features/commands/passthrough/--view/02_if_view_option_is_not_provided_then_default_view/test.itest +++ b/tests/integration/features/commands/passthrough/--view/02_if_view_option_is_not_provided_then_default_view/test.itest @@ -1,4 +1,4 @@ -RUN: %strictdoc passthrough %S --output-dir %T +RUN: %strictdoc export %S --formats=sdoc --output-dir %T RUN: %cat %T/sdoc/input.sdoc | filecheck %s --check-prefix=CHECK-SDOC CHECK-SDOC: REQ-1 diff --git a/tests/integration/features/sdoc/document_grammar/validation/03b_valid_field_but_incorrect_order_UID/test.itest b/tests/integration/features/sdoc/document_grammar/validation/03b_valid_field_but_incorrect_order_UID/test.itest index d5ce9f43e..4eea36ed7 100644 --- a/tests/integration/features/sdoc/document_grammar/validation/03b_valid_field_but_incorrect_order_UID/test.itest +++ b/tests/integration/features/sdoc/document_grammar/validation/03b_valid_field_but_incorrect_order_UID/test.itest @@ -1,4 +1,4 @@ -RUN: %expect_exit 1 %strictdoc passthrough %S/input.sdoc --output-dir %T/ | filecheck %s +RUN: %expect_exit 1 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir %T/ | filecheck %s # The same validation message should be produced even if the auto-uid command is executed. # https://github.com/strictdoc-project/strictdoc/issues/1896 diff --git a/tests/integration/features/sdoc/document_grammar/validation/04b_missing_required_grammar_field/test.itest b/tests/integration/features/sdoc/document_grammar/validation/04b_missing_required_grammar_field/test.itest index 324fcc60c..1ee65b05e 100644 --- a/tests/integration/features/sdoc/document_grammar/validation/04b_missing_required_grammar_field/test.itest +++ b/tests/integration/features/sdoc/document_grammar/validation/04b_missing_required_grammar_field/test.itest @@ -1,4 +1,4 @@ -RUN: %expect_exit 1 %strictdoc passthrough %S/input.sdoc --output-dir %T/ | filecheck %s +RUN: %expect_exit 1 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir %T/ | filecheck %s CHECK: error: could not parse file: {{.*}}/input.sdoc. CHECK: Semantic error: Node is missing a field that is required by grammar: UID. diff --git a/tests/integration/features/commands/bypass/00_basic_requirement_test/input.sdoc b/tests/integration/features/sdoc/passthrough/00_basic_requirement_test/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/00_basic_requirement_test/input.sdoc rename to tests/integration/features/sdoc/passthrough/00_basic_requirement_test/input.sdoc diff --git a/tests/integration/features/sdoc/passthrough/00_basic_requirement_test/test.itest b/tests/integration/features/sdoc/passthrough/00_basic_requirement_test/test.itest new file mode 100644 index 000000000..baa5fc592 --- /dev/null +++ b/tests/integration/features/sdoc/passthrough/00_basic_requirement_test/test.itest @@ -0,0 +1,2 @@ +RUN: %expect_exit 0 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir=%T/ +RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/01_empty_document_with_freetext/input.sdoc b/tests/integration/features/sdoc/passthrough/01_empty_document_with_freetext/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/01_empty_document_with_freetext/input.sdoc rename to tests/integration/features/sdoc/passthrough/01_empty_document_with_freetext/input.sdoc diff --git a/tests/integration/features/sdoc/passthrough/01_empty_document_with_freetext/test.itest b/tests/integration/features/sdoc/passthrough/01_empty_document_with_freetext/test.itest new file mode 100644 index 000000000..baa5fc592 --- /dev/null +++ b/tests/integration/features/sdoc/passthrough/01_empty_document_with_freetext/test.itest @@ -0,0 +1,2 @@ +RUN: %expect_exit 0 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir=%T/ +RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/03_basic_document_test/input.sdoc b/tests/integration/features/sdoc/passthrough/03_basic_document_test/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/03_basic_document_test/input.sdoc rename to tests/integration/features/sdoc/passthrough/03_basic_document_test/input.sdoc diff --git a/tests/integration/features/sdoc/passthrough/03_basic_document_test/test.itest b/tests/integration/features/sdoc/passthrough/03_basic_document_test/test.itest new file mode 100644 index 000000000..baa5fc592 --- /dev/null +++ b/tests/integration/features/sdoc/passthrough/03_basic_document_test/test.itest @@ -0,0 +1,2 @@ +RUN: %expect_exit 0 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir=%T/ +RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/10_multiple_documents/input/input1.sdoc b/tests/integration/features/sdoc/passthrough/10_multiple_documents/input/input1.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/10_multiple_documents/input/input1.sdoc rename to tests/integration/features/sdoc/passthrough/10_multiple_documents/input/input1.sdoc diff --git a/tests/integration/features/commands/bypass/10_multiple_documents/input/nested/input2.sdoc b/tests/integration/features/sdoc/passthrough/10_multiple_documents/input/nested/input2.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/10_multiple_documents/input/nested/input2.sdoc rename to tests/integration/features/sdoc/passthrough/10_multiple_documents/input/nested/input2.sdoc diff --git a/tests/integration/features/commands/bypass/10_multiple_documents/test.itest b/tests/integration/features/sdoc/passthrough/10_multiple_documents/test.itest similarity index 60% rename from tests/integration/features/commands/bypass/10_multiple_documents/test.itest rename to tests/integration/features/sdoc/passthrough/10_multiple_documents/test.itest index 6eac986b2..f2181c059 100644 --- a/tests/integration/features/commands/bypass/10_multiple_documents/test.itest +++ b/tests/integration/features/sdoc/passthrough/10_multiple_documents/test.itest @@ -1,3 +1,3 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/input --output-dir=%T +RUN: %expect_exit 0 %strictdoc export %S/input --formats=sdoc --output-dir=%T RUN: %diff %S/input/input1.sdoc %T/sdoc/input1.sdoc RUN: %diff %S/input/nested/input2.sdoc %T/sdoc/nested/input2.sdoc diff --git a/tests/integration/features/commands/bypass/20_filter_requirements/expected/output.sdoc b/tests/integration/features/sdoc/passthrough/20_filter_requirements/expected/output.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/20_filter_requirements/expected/output.sdoc rename to tests/integration/features/sdoc/passthrough/20_filter_requirements/expected/output.sdoc diff --git a/tests/integration/features/commands/bypass/20_filter_requirements/input.sdoc b/tests/integration/features/sdoc/passthrough/20_filter_requirements/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/20_filter_requirements/input.sdoc rename to tests/integration/features/sdoc/passthrough/20_filter_requirements/input.sdoc diff --git a/tests/integration/features/sdoc/passthrough/20_filter_requirements/test.itest b/tests/integration/features/sdoc/passthrough/20_filter_requirements/test.itest new file mode 100644 index 000000000..5a96b5bf3 --- /dev/null +++ b/tests/integration/features/sdoc/passthrough/20_filter_requirements/test.itest @@ -0,0 +1,4 @@ +RUN: %expect_exit 0 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir=%T --filter-requirements '("2" in node["TITLE"] or "4" in node["TITLE"])' | filecheck %s --dump-input=fail +CHECK: Reading SDOC: input.sdoc + +RUN: %diff %S/expected/output.sdoc %T/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/30_in_place_rewrite/expected.sdoc b/tests/integration/features/sdoc/passthrough/30_in_place_rewrite/expected.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/30_in_place_rewrite/expected.sdoc rename to tests/integration/features/sdoc/passthrough/30_in_place_rewrite/expected.sdoc diff --git a/tests/integration/features/commands/bypass/30_in_place_rewrite/input.sdoc b/tests/integration/features/sdoc/passthrough/30_in_place_rewrite/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/30_in_place_rewrite/input.sdoc rename to tests/integration/features/sdoc/passthrough/30_in_place_rewrite/input.sdoc diff --git a/tests/integration/features/sdoc/passthrough/30_in_place_rewrite/test.itest b/tests/integration/features/sdoc/passthrough/30_in_place_rewrite/test.itest new file mode 100644 index 000000000..08e477805 --- /dev/null +++ b/tests/integration/features/sdoc/passthrough/30_in_place_rewrite/test.itest @@ -0,0 +1,4 @@ +RUN: mkdir %T/sandbox +RUN: cp %S/input.sdoc %T/sandbox/ +RUN: %expect_exit 0 %strictdoc export %T/sandbox/input.sdoc --formats=sdoc --output-dir=%T/sandbox --filter-requirements='"2" not in node["TITLE"]' +RUN: %diff %S/expected.sdoc %T/sandbox/sdoc/input.sdoc diff --git a/tests/integration/features/commands/bypass/40_generate_mid/input.sdoc b/tests/integration/features/sdoc/passthrough/40_generate_mid/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/40_generate_mid/input.sdoc rename to tests/integration/features/sdoc/passthrough/40_generate_mid/input.sdoc diff --git a/tests/integration/features/commands/bypass/40_generate_mid/test.itest b/tests/integration/features/sdoc/passthrough/40_generate_mid/test.itest similarity index 75% rename from tests/integration/features/commands/bypass/40_generate_mid/test.itest rename to tests/integration/features/sdoc/passthrough/40_generate_mid/test.itest index 8e4afbc94..0a92cc8ca 100644 --- a/tests/integration/features/commands/bypass/40_generate_mid/test.itest +++ b/tests/integration/features/sdoc/passthrough/40_generate_mid/test.itest @@ -1,4 +1,4 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/input.sdoc --output-dir=%T | filecheck %s --dump-input=fail +RUN: %expect_exit 0 %strictdoc export %S/input.sdoc --formats=sdoc --output-dir=%T | filecheck %s --dump-input=fail CHECK: Reading SDOC: input.sdoc RUN: %cat %T/sdoc/input.sdoc | filecheck %s --dump-input=fail --check-prefix=CHECK-OUT-SDOC diff --git a/tests/integration/features/commands/bypass/50_nested_document_from_file/input.sdoc b/tests/integration/features/sdoc/passthrough/50_nested_document_from_file/input.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/50_nested_document_from_file/input.sdoc rename to tests/integration/features/sdoc/passthrough/50_nested_document_from_file/input.sdoc diff --git a/tests/integration/features/commands/bypass/50_nested_document_from_file/nested/input2.sdoc b/tests/integration/features/sdoc/passthrough/50_nested_document_from_file/nested/input2.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/50_nested_document_from_file/nested/input2.sdoc rename to tests/integration/features/sdoc/passthrough/50_nested_document_from_file/nested/input2.sdoc diff --git a/tests/integration/features/commands/bypass/50_nested_document_from_file/nested/subnested/input3.sdoc b/tests/integration/features/sdoc/passthrough/50_nested_document_from_file/nested/subnested/input3.sdoc similarity index 100% rename from tests/integration/features/commands/bypass/50_nested_document_from_file/nested/subnested/input3.sdoc rename to tests/integration/features/sdoc/passthrough/50_nested_document_from_file/nested/subnested/input3.sdoc diff --git a/tests/integration/features/commands/bypass/50_nested_document_from_file/test.itest b/tests/integration/features/sdoc/passthrough/50_nested_document_from_file/test.itest similarity index 71% rename from tests/integration/features/commands/bypass/50_nested_document_from_file/test.itest rename to tests/integration/features/sdoc/passthrough/50_nested_document_from_file/test.itest index 27de5b651..8df57cc29 100644 --- a/tests/integration/features/commands/bypass/50_nested_document_from_file/test.itest +++ b/tests/integration/features/sdoc/passthrough/50_nested_document_from_file/test.itest @@ -1,4 +1,4 @@ -RUN: %expect_exit 0 %strictdoc passthrough %S/ --output-dir=%T/ +RUN: %expect_exit 0 %strictdoc export %S/ --formats=sdoc --output-dir=%T/ RUN: %diff %S/input.sdoc %T/sdoc/input.sdoc RUN: %diff %S/nested/input2.sdoc %T/sdoc/nested/input2.sdoc diff --git a/tests/integration/self_testing/commands/passthrough/01_hello_world/test.itest b/tests/integration/self_testing/commands/passthrough/01_hello_world/test.itest index 57bdff0e7..7e67071af 100644 --- a/tests/integration/self_testing/commands/passthrough/01_hello_world/test.itest +++ b/tests/integration/self_testing/commands/passthrough/01_hello_world/test.itest @@ -1,4 +1,4 @@ -RUN: cd "%strictdoc_root/" && %strictdoc passthrough "%strictdoc_root/" --output-dir="%T/" +RUN: cd "%strictdoc_root/" && %strictdoc export "%strictdoc_root/" --formats=sdoc --output-dir="%T/" RUN: %diff "%strictdoc_root/docs/strictdoc_01_user_guide.sdoc" "%T/sdoc/docs/strictdoc_01_user_guide.sdoc" RUN: %diff "%strictdoc_root/docs/strictdoc_02_feature_map.sdoc" "%T/sdoc/docs/strictdoc_02_feature_map.sdoc" diff --git a/tests/unit/strictdoc/cli/test_cli_arg_parser.py b/tests/unit/strictdoc/cli/test_cli_arg_parser.py index c5a5547e0..0d45532e0 100644 --- a/tests/unit/strictdoc/cli/test_cli_arg_parser.py +++ b/tests/unit/strictdoc/cli/test_cli_arg_parser.py @@ -155,59 +155,3 @@ def test_export_09_config(): config_parser = create_sdoc_args_parser(args) export_config = config_parser.get_export_config() assert export_config.get_path_to_config() == "/path/to/strictdoc.toml" - - -def test_passthrough_01_minimal(): - parser = cli_args_parser() - - args = parser.parse_args(["passthrough", "input.sdoc"]) - - assert sorted(args._get_kwargs()) == [ - ("chromedriver", None), - ("command", "passthrough"), - ("config", None), - ("debug", False), - ("enable_mathjax", False), - ("fields", None), - ("filter_nodes", None), - ("formats", ["sdoc"]), - ("generate_bundle_document", False), - ("included_documents", False), - ("input_paths", ["input.sdoc"]), - ("no_parallelization", False), - ("output_dir", None), - ("project_title", None), - ("reqif_enable_mid", False), - ("reqif_multiline_is_xhtml", False), - ("reqif_profile", None), - ("view", None), - ] - - -def test_passthrough_02_minimal(): - parser = cli_args_parser() - - args = parser.parse_args( - ["passthrough", "input.sdoc", "--output-dir", "SANDBOX/"] - ) - - assert sorted(args._get_kwargs()) == [ - ("chromedriver", None), - ("command", "passthrough"), - ("config", None), - ("debug", False), - ("enable_mathjax", False), - ("fields", None), - ("filter_nodes", None), - ("formats", ["sdoc"]), - ("generate_bundle_document", False), - ("included_documents", False), - ("input_paths", ["input.sdoc"]), - ("no_parallelization", False), - ("output_dir", "SANDBOX/"), - ("project_title", None), - ("reqif_enable_mid", False), - ("reqif_multiline_is_xhtml", False), - ("reqif_profile", None), - ("view", None), - ]