├── .github └── workflows │ └── tests.yml ├── .gitignore ├── .gitmodules ├── LICENSE.txt ├── README.md ├── amalgamate └── tests └── tests ├── array-contains-item.tests ├── detect-extension.tests ├── expand-dir-path.tests ├── expand-path.tests ├── file-printf.test ├── files-to-amalgamate-arguments.tests ├── filter-array-with-array.tests ├── find-by-extensions.tests ├── first-file-option.tests ├── gather-standard-include-paths.tests ├── get-clean-line.tests ├── get-tag.tests ├── group-standard-headers-and-interlude-options.tests ├── group-standard-headers-option.tests ├── header-prelude-option.tests ├── include-dir-option.test ├── include-guard-option.tests ├── inline-file.tests ├── input-directory-option.tests ├── input-header-and-source-extension-option.tests ├── input-header-extension-option.tests ├── input-source-extension-option.tests ├── insert-annotations-option.tests ├── interlude-option.tests ├── into-header-source-pair-option.tests ├── into-single-header-option.tests ├── into-single-source-option.tests ├── is-blank-line.tests ├── is-include-line.tests ├── is-pragma-once-line.tests ├── is-standard-include-line.tests ├── make-include-guard-id.tests ├── output-directory-option.tests ├── output-extensions-option.tests ├── output-name-option.tests ├── path-extension.tests ├── path-from-include-line.tests ├── path-from-standard-include-line.tests ├── reduce-blank-lines-option.tests ├── reduce-blank-lines.tests ├── relative-path.tests ├── resolve-include-path.tests ├── sandboxes ├── file-printf │ └── requisites │ │ ├── expected │ │ ├── appended-file.txt │ │ ├── format-d.txt │ │ ├── format-s.txt │ │ └── new-file.txt │ │ └── file.txt ├── files-to-amalgamate-arguments │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── one-amalgamated.hpp │ │ ├── one-two-amalgamated.hpp │ │ └── one-two-three-amalgamated.hpp │ │ └── project │ │ ├── one.hpp │ │ ├── three.hpp │ │ └── two.hpp ├── find-by-extensions │ └── requisites │ │ ├── deep-and-messy │ │ ├── CMakeLists.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── component-one │ │ │ ├── CMakeLists.txt │ │ │ ├── component-one.cpp │ │ │ └── component-one.hpp │ │ │ ├── component-three │ │ │ ├── CMakeLists.txt │ │ │ ├── component-three.c++ │ │ │ └── component-three.h++ │ │ │ ├── component-two │ │ │ ├── CMakeLists.txt │ │ │ ├── component-two.cpp │ │ │ └── component-two.h │ │ │ ├── main.cpp │ │ │ ├── main.h │ │ │ └── utils │ │ │ ├── CMakeLists.txt │ │ │ ├── util-one.c │ │ │ ├── util-one.h │ │ │ ├── util-two.cxx │ │ │ └── util-two.hxx │ │ ├── deep │ │ ├── CMakeLists.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── component-one │ │ │ ├── CMakeLists.txt │ │ │ ├── component-one.cpp │ │ │ └── component-one.hpp │ │ │ ├── component-three │ │ │ ├── CMakeLists.txt │ │ │ ├── component-three.cpp │ │ │ └── component-three.hpp │ │ │ ├── component-two │ │ │ ├── CMakeLists.txt │ │ │ ├── component-two.cpp │ │ │ └── component-two.hpp │ │ │ ├── main.cpp │ │ │ ├── main.hpp │ │ │ └── utils │ │ │ ├── CMakeLists.txt │ │ │ ├── util-one.cpp │ │ │ ├── util-one.hpp │ │ │ ├── util-two.cpp │ │ │ └── util-two.hpp │ │ ├── empty │ │ └── placeholer-to-preserve-directory │ │ ├── messy │ │ ├── CMakeLists.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── constants.h │ │ ├── main.cpp │ │ ├── main.hpp │ │ ├── utils.cxx │ │ └── utils.hxx │ │ ├── not-a-cpp │ │ └── main.py │ │ ├── simple │ │ ├── CMakeLists.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── main.cpp │ │ ├── main.hpp │ │ ├── utils.cpp │ │ └── utils.hpp │ │ └── std-only │ │ ├── CMakeLists.txt │ │ ├── one.hpp │ │ ├── three.hpp │ │ └── two.hpp ├── first-file-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── bigger-project │ │ ├── one.cpp │ │ ├── one.hpp │ │ ├── two.cpp │ │ └── two.hpp │ │ ├── expected │ │ ├── bigger-project │ │ │ ├── pair-1-one.cpp │ │ │ │ ├── header.hpp │ │ │ │ └── source.cpp │ │ │ ├── pair-1-one.hpp │ │ │ │ ├── header.hpp │ │ │ │ └── source.cpp │ │ │ ├── pair-1-two.cpp │ │ │ │ ├── header.hpp │ │ │ │ └── source.cpp │ │ │ └── pair-1-two.hpp │ │ │ │ ├── header.hpp │ │ │ │ └── source.cpp │ │ └── small-project │ │ │ ├── pair-1-header.hpp │ │ │ ├── header.hpp │ │ │ └── source.cpp │ │ │ ├── pair-1-source.cpp │ │ │ ├── header.hpp │ │ │ └── source.cpp │ │ │ ├── single-header │ │ │ ├── 1-header.hpp-amalgamated.hpp │ │ │ └── 1-source.cpp-amalgamated.hpp │ │ │ └── single-source │ │ │ ├── 1-header.hpp-amalgamated.cpp │ │ │ └── 1-source.cpp-amalgamated.cpp │ │ └── small-project │ │ ├── header.hpp │ │ └── source.cpp ├── gather-standard-include-paths │ └── requisites │ │ ├── empty.hpp │ │ ├── multiple-both.hpp │ │ ├── multiple-non-standard.hpp │ │ ├── multiple-standard.hpp │ │ ├── nothing.hpp │ │ ├── single-non-standard.hpp │ │ └── single-standard.hpp ├── group-standard-headers-and-interlude-options │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ └── project-amalgamated.hpp │ │ ├── interlude.txt │ │ └── project │ │ ├── one.hpp │ │ └── two.hpp ├── group-standard-headers-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── no-standard-headers.hpp │ │ ├── repeated-headers.hpp │ │ └── unique-headers.hpp │ │ ├── no-standard-headers │ │ ├── one.hpp │ │ ├── three.hpp │ │ └── two.hpp │ │ ├── repeated-headers │ │ ├── one.hpp │ │ ├── three.hpp │ │ └── two.hpp │ │ └── unique-headers │ │ ├── one.hpp │ │ └── two.hpp ├── header-prelude-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-amalgamated-into-header-with-prelude-two.hpp │ │ ├── project-amalgamated-into-header.hpp │ │ ├── project-amalgamated-into-pair.cpp │ │ ├── project-amalgamated-into-pair.hpp │ │ └── project-amalgamated-into-source.hpp │ │ ├── prelude-one.txt │ │ ├── prelude-two.txt │ │ └── project │ │ ├── header.hpp │ │ └── source.cpp ├── include-dir-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-amalgamated-with-include-one.hpp │ │ ├── project-amalgamated-with-include-two.hpp │ │ └── project-without-include-amalgamated.hpp │ │ ├── project-without-include │ │ ├── include-one │ │ │ └── another.hpp │ │ ├── include-two │ │ │ └── another.hpp │ │ └── src │ │ │ └── header.hpp │ │ └── project │ │ ├── include-one │ │ └── another.hpp │ │ ├── include-two │ │ └── another.hpp │ │ └── src │ │ └── header.hpp ├── include-guard-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project(name)-amalgamated.hpp │ │ ├── project-amalgamated-into-header.hpp │ │ ├── project-amalgamated-into-pair.cpp │ │ ├── project-amalgamated-into-pair.hpp │ │ ├── project-amalgamated-into-source.cpp │ │ ├── project-amalgamated-with-another-include-guard-id.hpp │ │ ├── project-amalgamated-with-different-include-guard-id.hpp │ │ ├── project-h-amalgamated.h │ │ ├── project-hxx-amalgamated.hpp │ │ ├── project-hxx-amalgamated.hxx │ │ ├── project-name-amalgamated.hpp │ │ ├── project.name-amalgamated.hpp │ │ └── project_name-amalgamated.hpp │ │ ├── project(name) │ │ └── header.hpp │ │ ├── project-h │ │ └── header.h │ │ ├── project-hxx │ │ └── header.hxx │ │ ├── project-name │ │ └── header.hpp │ │ ├── project.name │ │ └── header.hpp │ │ ├── project │ │ ├── header.hpp │ │ └── source.cpp │ │ └── project_name │ │ └── header.hpp ├── inline-file │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── one-inlined-with-double-space-indent.hpp │ │ ├── one-inlined-with-quad-space-indent.hpp │ │ ├── one-inlined.hpp │ │ ├── one-two-inlined-with-double-space-indent.hpp │ │ ├── one-two-inlined.hpp │ │ ├── one-two-three-inlined-with-mixed-indent-variant-1.hpp │ │ ├── one-two-three-inlined-with-mixed-indent-variant-2.hpp │ │ ├── one-two-three-inlined-with-quad-space-indent.hpp │ │ └── one-two-three-inlined.hpp │ │ ├── one.hpp │ │ ├── three.hpp │ │ └── two.hpp ├── input-directory-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── first-amalgamated.hpp │ │ ├── second-amalgamated.hpp │ │ └── third-amalgamated.hpp │ │ ├── first │ │ └── header.hpp │ │ ├── second │ │ ├── src │ │ │ └── header.hpp │ │ └── tests │ │ │ └── tests.cpp │ │ └── third │ │ ├── sources │ │ └── header.hpp │ │ └── tests │ │ └── tests.cpp ├── input-header-and-source-extension-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-h++-c++-amalgamated.c++ │ │ ├── project-h++-c++-amalgamated.h++ │ │ ├── project-h-c-amalgamated.c │ │ ├── project-h-c-amalgamated.h │ │ ├── project-hpp-cpp-amalgamated.cpp │ │ ├── project-hpp-cpp-amalgamated.hpp │ │ ├── project-hxx-cxx-amalgamated.cxx │ │ └── project-hxx-cxx-amalgamated.hxx │ │ └── project │ │ ├── header.h │ │ ├── header.h++ │ │ ├── header.hpp │ │ ├── header.hxx │ │ ├── source.c │ │ ├── source.c++ │ │ ├── source.cpp │ │ └── source.cxx ├── input-header-extension-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-h++-amalgamated.cpp │ │ ├── project-h++-amalgamated.h++ │ │ ├── project-h++-and-all-sources-amalgamated.cpp │ │ ├── project-h++-and-all-sources-amalgamated.h++ │ │ ├── project-h-amalgamated.cpp │ │ ├── project-h-amalgamated.h │ │ ├── project-h-and-all-sources-amalgamated.cpp │ │ ├── project-h-and-all-sources-amalgamated.h │ │ ├── project-hpp-amalgamated.cpp │ │ ├── project-hpp-amalgamated.hpp │ │ ├── project-hpp-and-all-sources-amalgamated.cpp │ │ ├── project-hpp-and-all-sources-amalgamated.hpp │ │ ├── project-hxx-amalgamated.cpp │ │ ├── project-hxx-amalgamated.hxx │ │ ├── project-hxx-and-all-sources-amalgamated.cpp │ │ └── project-hxx-and-all-sources-amalgamated.hxx │ │ └── project │ │ ├── header.h │ │ ├── header.h++ │ │ ├── header.hpp │ │ ├── header.hxx │ │ ├── source.c │ │ ├── source.c++ │ │ ├── source.cpp │ │ └── source.cxx ├── input-source-extension-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-all-headers-and-c++-amalgamated.c++ │ │ ├── project-all-headers-and-c++-amalgamated.h │ │ ├── project-all-headers-and-c-amalgamated.c │ │ ├── project-all-headers-and-c-amalgamated.h │ │ ├── project-all-headers-and-cpp-amalgamated.cpp │ │ ├── project-all-headers-and-cpp-amalgamated.h │ │ ├── project-all-headers-and-cxx-amalgamated.cxx │ │ ├── project-all-headers-and-cxx-amalgamated.h │ │ ├── project-c++-amalgamated.c++ │ │ ├── project-c++-amalgamated.h │ │ ├── project-c-amalgamated.c │ │ ├── project-c-amalgamated.h │ │ ├── project-cpp-amalgamated.cpp │ │ ├── project-cpp-amalgamated.h │ │ ├── project-cxx-amalgamated.cxx │ │ └── project-cxx-amalgamated.h │ │ └── project │ │ ├── header.h │ │ ├── header.h++ │ │ ├── header.hpp │ │ ├── header.hxx │ │ ├── source.c │ │ ├── source.c++ │ │ ├── source.cpp │ │ └── source.cxx ├── insert-annotations-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ └── project-amalgamated.hpp │ │ └── project │ │ ├── implementation.hpp │ │ ├── interface.hpp │ │ └── utility.hpp ├── interlude-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-amalgamated-into-header-interlude-one.hpp │ │ ├── project-amalgamated-into-header-interlude-two.hpp │ │ ├── project-amalgamated-into-pair-interlude-one.cpp │ │ ├── project-amalgamated-into-pair-interlude-one.hpp │ │ └── project-amalgamated-into-source-interlude-one.cpp │ │ ├── interlude-one.txt │ │ ├── interlude-two.txt │ │ └── project │ │ ├── header.hpp │ │ └── source.cpp ├── into-header-source-pair-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── header-and-source-amalgamated.cpp │ │ ├── header-and-source-amalgamated.hpp │ │ ├── header-only-amalgamated.cpp │ │ ├── header-only-amalgamated.hpp │ │ ├── source-only-amalgamated.cpp │ │ └── source-only-amalgamated.h │ │ ├── header-and-source │ │ ├── header.hpp │ │ └── source.cpp │ │ ├── header-only │ │ └── header.hpp │ │ └── source-only │ │ └── source.cpp ├── into-single-header-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── header-and-source-amalgamated.hpp │ │ ├── header-only-amalgamated.hpp │ │ └── source-only-amalgamated.h │ │ ├── header-and-source │ │ ├── header.hpp │ │ └── source.cpp │ │ ├── header-only │ │ └── header.hpp │ │ └── source-only │ │ └── source.cpp ├── into-single-source-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── header-and-source-amalgamated.cpp │ │ ├── header-only-amalgamated.cpp │ │ └── source-only-amalgamated.cpp │ │ ├── header-and-source │ │ ├── header.hpp │ │ └── source.cpp │ │ ├── header-only │ │ └── header.hpp │ │ └── source-only │ │ └── source.cpp ├── output-directory-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ └── project-amalgamated.hpp │ │ └── project │ │ └── header.hpp ├── output-name-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ └── project │ │ ├── header.hpp │ │ └── source.cpp ├── path-expansion │ └── requisites │ │ ├── one.txt │ │ ├── one │ │ ├── four.txt │ │ ├── four │ │ │ ├── nine.txt │ │ │ └── ten.txt │ │ ├── three.txt │ │ └── three │ │ │ ├── eight.txt │ │ │ └── seven.txt │ │ ├── two.txt │ │ └── two │ │ ├── five.txt │ │ ├── five │ │ ├── eleven.txt │ │ └── twelve.txt │ │ ├── six.txt │ │ └── six │ │ ├── fourteen.txt │ │ └── thirteen.txt ├── reduce-blank-lines-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-amalgamated-b-0.hpp │ │ ├── project-amalgamated-b-1.hpp │ │ └── project-amalgamated-b-2.hpp │ │ └── project │ │ ├── header.hpp │ │ └── source.cpp ├── reduce-blank-lines │ └── requisites │ │ ├── double-blank-lines.hpp │ │ ├── empty.hpp │ │ ├── expected │ │ ├── double-blank-lines-reduced-to-0.hpp │ │ ├── double-blank-lines-reduced-to-1.hpp │ │ ├── double-blank-lines-reduced-to-2.hpp │ │ ├── empty.hpp │ │ ├── mixed-blank-lines-reduced-to-0.hpp │ │ ├── mixed-blank-lines-reduced-to-1.hpp │ │ ├── mixed-blank-lines-reduced-to-2.hpp │ │ ├── single-blank-lines-reduced-to-0.hpp │ │ ├── single-blank-lines-reduced-to-1.hpp │ │ ├── single-blank-lines-reduced-to-2.hpp │ │ ├── triple-blank-lines-reduced-to-0.hpp │ │ ├── triple-blank-lines-reduced-to-1.hpp │ │ └── triple-blank-lines-reduced-to-2.hpp │ │ ├── mixed-blank-lines.hpp │ │ ├── single-blank-lines.hpp │ │ └── triple-blank-lines.hpp ├── simple-projects │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── header-and-source │ │ ├── header.hpp │ │ └── source.cpp │ │ ├── header-only │ │ └── header.hpp │ │ └── source-only │ │ └── source.cpp ├── source-prelude-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ ├── project-amalgamated-into-header-with-prelude-two.hpp │ │ ├── project-amalgamated-into-header.hpp │ │ ├── project-amalgamated-into-pair.cpp │ │ ├── project-amalgamated-into-pair.hpp │ │ └── project-amalgamated-into-source.hpp │ │ ├── prelude-one.txt │ │ ├── prelude-two.txt │ │ └── project │ │ ├── header.hpp │ │ └── source.cpp ├── trim-trailing-whitespace-option │ ├── environment │ │ └── amalgamate │ └── requisites │ │ ├── expected │ │ └── project-amalgamated.hpp │ │ └── project │ │ ├── header.hpp │ │ └── source.cpp ├── trim-trailing-whitespace │ └── requisites │ │ ├── empty.hpp │ │ ├── expected │ │ ├── empty.hpp │ │ ├── non-trimmed.hpp │ │ └── trimmed.hpp │ │ ├── non-trimmed.hpp │ │ └── trimmed.hpp └── verbose-mode-option │ ├── environment │ └── amalgamate │ └── requisites │ ├── expected │ ├── file-list-1 │ ├── file-list-2 │ ├── file-list-3 │ ├── first-file-header-hpp │ ├── first-file-source-cpp │ ├── group-headers-on-top │ ├── header-extensions-h-hh │ ├── header-extensions-hpp-h++ │ ├── header-interlude-1-txt │ ├── header-interlude-2-txt │ ├── header-prelude-1-txt │ ├── header-prelude-1-txt-pair │ ├── header-prelude-1-txt-source-only │ ├── header-prelude-2-txt │ ├── include-guard-automatic │ ├── include-guard-custom-1 │ ├── include-guard-custom-2 │ ├── include-src │ ├── include-src-project │ ├── input-src │ ├── input-src-project │ ├── just-verbose │ ├── name-shmoject │ ├── name-shmouject │ ├── output-dir-up │ ├── output-extensions-h++-c++ │ ├── output-extensions-hh-cc │ ├── output-header-only │ ├── pair │ ├── reduce-blank-lines-0 │ ├── reduce-blank-lines-1 │ ├── reduce-blank-lines-2 │ ├── source-extensions-c-cc │ ├── source-extensions-cpp-c++ │ ├── source-only │ ├── source-prelude-1-txt │ ├── source-prelude-1-txt-pair │ ├── source-prelude-1-txt-source-only │ ├── source-prelude-2-txt │ └── trim-trailing-whitespace │ ├── interlude-1.txt │ ├── interlude-2.txt │ ├── prelude-1.txt │ ├── prelude-2.txt │ └── project │ └── src │ └── project │ ├── header.hpp │ └── source.cpp ├── source-prelude-option.tests ├── split-string.tests ├── trim-trailing-whitespace-option.tests ├── trim-trailing-whitespace.tests ├── value-or.tests └── verbose-mode-option.tests /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | on: [push] 3 | jobs: 4 | run: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v4 8 | with: 9 | submodules: 'true' 10 | - run: tests/external/bash-test/bash-test --sample amalgamate --tests tests/tests/ 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bash-test 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "bash-test"] 2 | path = tests/external/bash-test 3 | url = https://github.com/shrpnsld/bash-test 4 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Anton Diehtiar 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /tests/tests/array-contains-item.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'array-contains-item() with empty array' 4 | subject=() 5 | CHECK ! array-contains-item 'one' "${subject[@]}" 6 | 7 | TEST-CASE 'array-contains-item() with single-item array' 8 | subject=('one') 9 | CHECK array-contains-item 'one' "${subject[@]}" 10 | CHECK ! array-contains-item 'two' "${subject[@]}" 11 | 12 | TEST-CASE 'array-contains-item() with multiple-item array' 13 | subject=('one' 'two' 'three') 14 | CHECK array-contains-item 'one' "${subject[@]}" 15 | CHECK array-contains-item 'two' "${subject[@]}" 16 | CHECK array-contains-item 'three' "${subject[@]}" 17 | CHECK ! array-contains-item 'four' "${subject[@]}" 18 | 19 | TEST-CASE 'array-contains-item() and items "with space"' 20 | subject=('one one' 'two two' 'three three') 21 | CHECK array-contains-item 'one one' "${subject[@]}" 22 | 23 | -------------------------------------------------------------------------------- /tests/tests/detect-extension.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'detect-extension() with same extensions' 4 | paths=('one.hpp') 5 | result=$(detect-extension 'h' "${paths[@]}") 6 | CHECK [ "$result" == 'hpp' ] 7 | 8 | paths=('one.hpp' 'two.hpp') 9 | result=$(detect-extension 'h' "${paths[@]}") 10 | CHECK [ "$result" == 'hpp' ] 11 | 12 | paths=('one.hpp' 'two.hpp' 'three.hpp') 13 | result=$(detect-extension 'h' "${paths[@]}") 14 | CHECK [ "$result" == 'hpp' ] 15 | 16 | TEST-CASE 'detect-extension() with different extensions' 17 | paths=('one.hpp' 'two.hxx') 18 | result=$(detect-extension 'h' "${paths[@]}") 19 | CHECK [ "$result" == 'h' ] 20 | 21 | -------------------------------------------------------------------------------- /tests/tests/file-printf.test: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | USE-SANDBOX 4 | 5 | TEST-CASE 'file-printf() into a new file' 6 | file-printf 'file.txt' 'hellomoto!\n' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'file.txt' \ 9 | WITH-FILE 'expected/new-file.txt' 10 | 11 | TEST-CASE 'file-printf() into an existing file' 12 | USE-REQUISITES 'file.txt' 13 | file-printf 'file.txt' 'hellomoto!\n' 14 | CHECK-CONTENTS \ 15 | OF-FILE 'file.txt' \ 16 | WITH-FILE 'expected/appended-file.txt' 17 | 18 | TEST-CASE 'file-printf "%d"' 19 | file-printf 'file.txt' '%d\n' 456 20 | CHECK-CONTENTS \ 21 | OF-FILE 'file.txt' \ 22 | WITH-FILE 'expected/format-d.txt' 23 | 24 | TEST-CASE 'file-printf "%s"' 25 | file-printf 'file.txt' '%s\n' 'hellomoto!' 26 | CHECK-CONTENTS \ 27 | OF-FILE 'file.txt' \ 28 | WITH-FILE 'expected/format-s.txt' 29 | 30 | -------------------------------------------------------------------------------- /tests/tests/files-to-amalgamate-arguments.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -- "one.hpp"' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -- 'one.hpp' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/one-amalgamated.hpp' 10 | 11 | TEST-CASE 'amalgamate -- "one.hpp" "two.hpp"' 12 | USE-REQUISITES 'project' 13 | cd 'project' 14 | CHECK-COMMAND amalgamate -- 'one.hpp' 'two.hpp' 15 | CHECK-CONTENTS \ 16 | OF-FILE 'project-amalgamated/project.hpp' \ 17 | WITH-FILE 'expected/one-two-amalgamated.hpp' 18 | 19 | TEST-CASE 'amalgamate -- "one.hpp" "two.hpp" "three.hpp"' 20 | USE-REQUISITES 'project' 21 | cd 'project' 22 | CHECK-COMMAND amalgamate -- 'one.hpp' 'two.hpp' 'three.hpp' 23 | CHECK-CONTENTS \ 24 | OF-FILE 'project-amalgamated/project.hpp' \ 25 | WITH-FILE 'expected/one-two-three-amalgamated.hpp' 26 | 27 | -------------------------------------------------------------------------------- /tests/tests/filter-array-with-array.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'filter-array-with-array() with empty arrays' 4 | subject1=() 5 | subject2=() 6 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 7 | CHECK [ ${#result[@]} == 0 ] 8 | 9 | TEST-CASE 'filter-array-with-array() with empty source array' 10 | subject1=() 11 | subject2=('one') 12 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 13 | CHECK [ ${#result[@]} == 0 ] 14 | 15 | TEST-CASE 'filter-array-with-array() with empty filtering array' 16 | subject1=('one' 'two' 'three') 17 | subject2=() 18 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 19 | CHECK [ ${#result[@]} == 3 ] 20 | CHECK [ "${result[0]}" == 'one' ] 21 | CHECK [ "${result[1]}" == 'two' ] 22 | CHECK [ "${result[2]}" == 'three' ] 23 | 24 | TEST-CASE 'filter-array-with-array() with single-item equal arrays' 25 | subject1=('one') 26 | subject2=('one') 27 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 28 | CHECK [ ${#result[@]} == 0 ] 29 | 30 | TEST-CASE 'filter-array-with-array() with single-item non-equal arrays' 31 | subject1=('one') 32 | subject2=('two') 33 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 34 | CHECK [ ${#result[@]} == 1 ] 35 | CHECK [ "${result[0]}" == 'one' ] 36 | 37 | TEST-CASE 'filter-array-with-array() with no matching filtering items' 38 | subject1=('one' 'two' 'three') 39 | subject2=('four' 'five') 40 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 41 | CHECK [ ${#result[@]} == 3 ] 42 | CHECK [ "${result[0]}" == 'one' ] 43 | CHECK [ "${result[1]}" == 'two' ] 44 | CHECK [ "${result[2]}" == 'three' ] 45 | 46 | TEST-CASE 'filter-array-with-array() with matching filtering items' 47 | subject1=('one' 'two' 'three' 'four' 'five') 48 | subject2=('three' 'two') 49 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 50 | CHECK [ ${#result[@]} == 3 ] 51 | CHECK [ "${result[0]}" == 'one' ] 52 | CHECK [ "${result[1]}" == 'four' ] 53 | CHECK [ "${result[2]}" == 'five' ] 54 | 55 | TEST-CASE 'filter-array-with-array() with source array having repeated items' 56 | subject1=('one' 'two' 'three' 'three' 'four' 'one' 'three' 'five') 57 | subject2=('three' 'two') 58 | result=($(filter-array-with-array ${#subject1[@]} "${subject1[@]}" "${subject2[@]}")) 59 | CHECK [ ${#result[@]} == 4 ] 60 | CHECK [ "${result[0]}" == 'one' ] 61 | CHECK [ "${result[1]}" == 'four' ] 62 | CHECK [ "${result[2]}" == 'one' ] 63 | CHECK [ "${result[3]}" == 'five' ] 64 | 65 | -------------------------------------------------------------------------------- /tests/tests/gather-standard-include-paths.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | USE-SANDBOX 4 | 5 | TEST-CASE 'gather-standard-include-paths() with empty file' 6 | paths=() 7 | result=($(gather-standard-include-paths "${paths[@]}")) 8 | CHECK [ ${#result[@]} == 0 ] 9 | 10 | TEST-CASE 'gather-standard-include-paths() with empty file' 11 | LINK-REQUISITES 'empty.hpp' 12 | paths=( 13 | 'empty.hpp' 14 | ) 15 | result=($(gather-standard-include-paths "${paths[@]}")) 16 | CHECK [ ${#result[@]} == 0 ] 17 | 18 | TEST-CASE 'gather-standard-include-paths() with nothing to gather' 19 | LINK-REQUISITES 'nothing.hpp' 20 | paths=( 21 | 'nothing.hpp' 22 | ) 23 | result=($(gather-standard-include-paths "${paths[@]}")) 24 | CHECK [ ${#result[@]} == 0 ] 25 | 26 | TEST-CASE 'gather-standard-include-paths() with "single-non-standard.hpp"' 27 | LINK-REQUISITES 'single-non-standard.hpp' 28 | paths=( 29 | 'single-non-standard.hpp' 30 | ) 31 | result=($(gather-standard-include-paths "${paths[@]}")) 32 | CHECK [ ${#result[@]} == 0 ] 33 | 34 | TEST-CASE 'gather-standard-include-paths() with "multiple-non-standard.hpp"' 35 | LINK-REQUISITES 'multiple-non-standard.hpp' 36 | paths=( 37 | 'multiple-non-standard.hpp' 38 | ) 39 | result=($(gather-standard-include-paths "${paths[@]}")) 40 | CHECK [ ${#result[@]} == 0 ] 41 | 42 | TEST-CASE 'gather-standard-include-paths() with "single-standard.hpp"' 43 | LINK-REQUISITES 'single-standard.hpp' 44 | paths=( 45 | 'single-standard.hpp' 46 | ) 47 | result=($(gather-standard-include-paths "${paths[@]}")) 48 | CHECK [ ${#result[@]} == 1 ] 49 | CHECK [ "${result[0]}" == 'iostream' ] 50 | 51 | TEST-CASE 'gather-standard-include-paths() with "multiple-standard.hpp"' 52 | LINK-REQUISITES 'multiple-standard.hpp' 53 | paths=( 54 | 'multiple-standard.hpp' 55 | ) 56 | result=($(gather-standard-include-paths "${paths[@]}")) 57 | CHECK [ ${#result[@]} == 3 ] 58 | CHECK [ "${result[0]}" == 'functional' ] 59 | CHECK [ "${result[1]}" == 'iterator' ] 60 | CHECK [ "${result[2]}" == 'vector' ] 61 | 62 | TEST-CASE 'gather-standard-include-paths() with "multiple-both.hpp"' 63 | LINK-REQUISITES 'multiple-both.hpp' 64 | paths=( 65 | 'multiple-both.hpp' 66 | ) 67 | result=($(gather-standard-include-paths "${paths[@]}")) 68 | CHECK [ ${#result[@]} == 3 ] 69 | CHECK [ "${result[0]}" == 'algorithm' ] 70 | CHECK [ "${result[1]}" == 'iostream' ] 71 | CHECK [ "${result[2]}" == 'string' ] 72 | 73 | TEST-CASE 'gather-standard-include-paths() with multiple paths' 74 | LINK-REQUISITES 'single-standard.hpp' 'single-non-standard.hpp' 'multiple-standard.hpp' 'multiple-non-standard.hpp' 'multiple-both.hpp' 75 | paths=( 76 | 'single-standard.hpp' 77 | 'single-non-standard.hpp' 78 | 'multiple-standard.hpp' 79 | 'multiple-non-standard.hpp' 80 | 'multiple-both.hpp' 81 | ) 82 | result=($(gather-standard-include-paths "${paths[@]}")) 83 | CHECK [ ${#result[@]} == 6 ] 84 | CHECK [ "${result[0]}" == 'algorithm' ] 85 | CHECK [ "${result[1]}" == 'functional' ] 86 | CHECK [ "${result[2]}" == 'iostream' ] 87 | CHECK [ "${result[3]}" == 'iterator' ] 88 | CHECK [ "${result[4]}" == 'string' ] 89 | CHECK [ "${result[5]}" == 'vector' ] 90 | 91 | -------------------------------------------------------------------------------- /tests/tests/get-clean-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'get-clean-line() with tag' 4 | result=$(get-clean-line ' #include // [amalgamate:leave]') 5 | CHECK [ "$result" == ' #include ' ] 6 | 7 | result=$(get-clean-line $'\t#include // [amalgamate:leave]') 8 | CHECK [ "$result" == $'\t#include ' ] 9 | 10 | result=$(get-clean-line '#include // [amalgamate:leave]') 11 | CHECK [ "$result" == '#include ' ] 12 | 13 | result=$(get-clean-line '#include // [amalgamate:leave]') 14 | CHECK [ "$result" == '#include ' ] 15 | 16 | result=$(get-clean-line $'#include \t// [amalgamate:leave]') 17 | CHECK [ "$result" == '#include ' ] 18 | 19 | result=$(get-clean-line $'#include \t// [amalgamate:leave]') 20 | CHECK [ "$result" == '#include ' ] 21 | 22 | result=$(get-clean-line $'#include \t // [amalgamate:leave]') 23 | CHECK [ "$result" == '#include ' ] 24 | 25 | -------------------------------------------------------------------------------- /tests/tests/get-tag.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'get-tag() with valid tag lines' 4 | result=$(get-tag '//[amalgamate:leave]') 5 | CHECK [ "$result" == 'leave' ] 6 | 7 | result=$(get-tag ' //[amalgamate:leave]') 8 | CHECK [ "$result" == 'leave' ] 9 | 10 | result=$(get-tag '// [amalgamate:leave]') 11 | CHECK [ "$result" == 'leave' ] 12 | 13 | result=$(get-tag '// [amalgamate :leave]') 14 | CHECK [ "$result" == 'leave' ] 15 | 16 | result=$(get-tag '// [amalgamate: leave]') 17 | CHECK [ "$result" == 'leave' ] 18 | 19 | result=$(get-tag '//[amalgamate:leave] ') 20 | CHECK [ "$result" == 'leave' ] 21 | 22 | result=$(get-tag ' // [amalgamate:leave] ') 23 | CHECK [ "$result" == 'leave' ] 24 | 25 | result=$(get-tag $'\t//[amalgamate:leave]') 26 | CHECK [ "$result" == 'leave' ] 27 | 28 | result=$(get-tag $'//\t[amalgamate:leave]') 29 | CHECK [ "$result" == 'leave' ] 30 | 31 | result=$(get-tag $'// [amalgamate\t:leave]') 32 | CHECK [ "$result" == 'leave' ] 33 | 34 | result=$(get-tag $'// [amalgamate:\tleave]') 35 | CHECK [ "$result" == 'leave' ] 36 | 37 | result=$(get-tag $'//[amalgamate:leave]\t') 38 | CHECK [ "$result" == 'leave' ] 39 | 40 | result=$(get-tag $' \t//[amalgamate:leave]') 41 | CHECK [ "$result" == 'leave' ] 42 | 43 | result=$(get-tag $'\t //[amalgamate:leave]') 44 | CHECK [ "$result" == 'leave' ] 45 | 46 | result=$(get-tag $'// \t[amalgamate:leave]') 47 | CHECK [ "$result" == 'leave' ] 48 | 49 | result=$(get-tag $'//\t [amalgamate:leave]') 50 | CHECK [ "$result" == 'leave' ] 51 | 52 | result=$(get-tag $'//[amalgamate \t:leave]') 53 | CHECK [ "$result" == 'leave' ] 54 | 55 | result=$(get-tag $'//[amalgamate:\t leave]') 56 | CHECK [ "$result" == 'leave' ] 57 | 58 | result=$(get-tag $'//[amalgamate:leave] \t') 59 | CHECK [ "$result" == 'leave' ] 60 | 61 | result=$(get-tag $'//[amalgamate:leave]\t ') 62 | CHECK [ "$result" == 'leave' ] 63 | 64 | result=$(get-tag $' \t// \t[amalgamate:leave] \t') 65 | CHECK [ "$result" == 'leave' ] 66 | 67 | result=$(get-tag $'\t //\t [amalgamate:leave]\t ') 68 | CHECK [ "$result" == 'leave' ] 69 | 70 | result=$(get-tag '#include // [amalgamate:leave]') 71 | CHECK [ "$result" == 'leave' ] 72 | 73 | result=$(get-tag '// #include // [amalgamate:uncomment]') 74 | CHECK [ "$result" == 'uncomment' ] 75 | 76 | TEST-CASE 'get-tag() with invalid tag lines' 77 | result=$(get-tag '[amalgamate:]') 78 | CHECK [ "$result" == '' ] 79 | 80 | result=$(get-tag '[amalgamate:leave]') 81 | CHECK [ "$result" == '' ] 82 | 83 | result=$(get-tag 'amalgamate:leave') 84 | CHECK [ "$result" == '' ] 85 | 86 | result=$(get-tag '// amalgamate:leave') 87 | CHECK [ "$result" == '' ] 88 | 89 | -------------------------------------------------------------------------------- /tests/tests/group-standard-headers-and-interlude-options.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -g -L interlude.txt' 4 | USE-REQUISITES 'project' 'interlude.txt' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -g -L '../interlude.txt' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated.hpp' 10 | 11 | -------------------------------------------------------------------------------- /tests/tests/group-standard-headers-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -g with "no-standard-headers" project' 4 | USE-REQUISITES 'no-standard-headers' 5 | cd 'no-standard-headers' 6 | CHECK-COMMAND amalgamate -g 7 | CHECK-CONTENTS \ 8 | OF-FILE 'no-standard-headers-amalgamated/no-standard-headers.hpp' \ 9 | WITH-FILE 'expected/no-standard-headers.hpp' 10 | 11 | TEST-CASE 'amalgamate -g with "unique-headers" project' 12 | USE-REQUISITES 'unique-headers' 13 | cd 'unique-headers' 14 | CHECK-COMMAND amalgamate -g 15 | CHECK-CONTENTS \ 16 | OF-FILE 'unique-headers-amalgamated/unique-headers.hpp' \ 17 | WITH-FILE 'expected/unique-headers.hpp' 18 | 19 | TEST-CASE 'amalgamate -g with "repeated-headers" project' 20 | USE-REQUISITES 'repeated-headers' 21 | cd 'repeated-headers' 22 | CHECK-COMMAND amalgamate -g 23 | CHECK-CONTENTS \ 24 | OF-FILE 'repeated-headers-amalgamated/repeated-headers.hpp' \ 25 | WITH-FILE 'expected/repeated-headers.hpp' 26 | 27 | -------------------------------------------------------------------------------- /tests/tests/header-prelude-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -P "prelude-one.txt"' 4 | USE-REQUISITES 'project' 'prelude-one.txt' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -P '../prelude-one.txt' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated-into-header.hpp' 10 | 11 | TEST-CASE 'amalgamate -P "prelude-one.txt" -S' 12 | USE-REQUISITES 'project' 'prelude-one.txt' 13 | cd 'project' 14 | CHECK-COMMAND amalgamate -P '../prelude-one.txt' -S 15 | CHECK-CONTENTS \ 16 | OF-FILE 'project-amalgamated/project.cpp' \ 17 | WITH-FILE 'expected/project-amalgamated-into-source.hpp' 18 | 19 | TEST-CASE 'amalgamate -P "prelude-one.txt" -M' 20 | USE-REQUISITES 'project' 'prelude-one.txt' 21 | cd 'project' 22 | CHECK-COMMAND amalgamate -P '../prelude-one.txt' -M 23 | CHECK-CONTENTS \ 24 | OF-FILE 'project-amalgamated/project.hpp' \ 25 | WITH-FILE 'expected/project-amalgamated-into-pair.hpp' 26 | CHECK-CONTENTS \ 27 | OF-FILE 'project-amalgamated/project.cpp' \ 28 | WITH-FILE 'expected/project-amalgamated-into-pair.cpp' 29 | 30 | TEST-CASE 'amalgamate -P "prelude-two.txt"' 31 | USE-REQUISITES 'project' 'prelude-two.txt' 32 | cd 'project' 33 | CHECK-COMMAND amalgamate -P '../prelude-two.txt' 34 | CHECK-CONTENTS \ 35 | OF-FILE 'project-amalgamated/project.hpp' \ 36 | WITH-FILE 'expected/project-amalgamated-into-header-with-prelude-two.hpp' 37 | 38 | -------------------------------------------------------------------------------- /tests/tests/include-dir-option.test: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate with "project-without-include"' 4 | USE-REQUISITES 'project-without-include' 5 | cd 'project-without-include' 6 | CHECK-COMMAND amalgamate -i 'src' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-without-include-amalgamated/project-without-include.hpp' \ 9 | WITH-FILE 'expected/project-without-include-amalgamated.hpp' 10 | 11 | TEST-CASE 'amalgamate -I include-one' 12 | USE-REQUISITES 'project' 13 | cd 'project' 14 | CHECK-COMMAND amalgamate -I 'include-one' -i 'src' 15 | CHECK-CONTENTS \ 16 | OF-FILE 'project-amalgamated/project.hpp' \ 17 | WITH-FILE 'expected/project-amalgamated-with-include-one.hpp' 18 | 19 | TEST-CASE 'amalgamate -I include-two' 20 | USE-REQUISITES 'project' 21 | cd 'project' 22 | CHECK-COMMAND amalgamate -I 'include-two' -i 'src' 23 | CHECK-CONTENTS \ 24 | OF-FILE 'project-amalgamated/project.hpp' \ 25 | WITH-FILE 'expected/project-amalgamated-with-include-two.hpp' 26 | 27 | -------------------------------------------------------------------------------- /tests/tests/include-guard-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | SECTION 'Default include guard identifier with special characters in project name' 4 | 5 | TEST-CASE 'amalgamate -G "" with "project-name"' 6 | USE-REQUISITES 'project-name' 7 | cd 'project-name' 8 | CHECK-COMMAND amalgamate -G '' 9 | CHECK-CONTENTS \ 10 | OF-FILE 'project-name-amalgamated/project-name.hpp' \ 11 | WITH-FILE 'expected/project-name-amalgamated.hpp' 12 | 13 | TEST-CASE 'amalgamate -G "" with "project.name"' 14 | USE-REQUISITES 'project.name' 15 | cd 'project.name' 16 | CHECK-COMMAND amalgamate -G '' 17 | CHECK-CONTENTS \ 18 | OF-FILE 'project.name-amalgamated/project.name.hpp' \ 19 | WITH-FILE 'expected/project.name-amalgamated.hpp' 20 | 21 | TEST-CASE 'amalgamate -G "" with "project(name)"' 22 | USE-REQUISITES 'project(name)' 23 | cd 'project(name)' 24 | CHECK-COMMAND amalgamate -G '' 25 | CHECK-CONTENTS \ 26 | OF-FILE 'project(name)-amalgamated/project(name).hpp' \ 27 | WITH-FILE 'expected/project(name)-amalgamated.hpp' 28 | 29 | TEST-CASE 'amalgamate -G "" with "project_name"' 30 | USE-REQUISITES 'project_name' 31 | cd 'project_name' 32 | CHECK-COMMAND amalgamate -G '' 33 | CHECK-CONTENTS \ 34 | OF-FILE 'project_name-amalgamated/project_name.hpp' \ 35 | WITH-FILE 'expected/project_name-amalgamated.hpp' 36 | 37 | 38 | SECTION 'Default include guard identifier with different header extensions' 39 | 40 | TEST-CASE 'amalgamate -G ""' 41 | USE-REQUISITES 'project-h' 42 | cd 'project-h' 43 | CHECK-COMMAND amalgamate -G '' 44 | CHECK-CONTENTS \ 45 | OF-FILE 'project-h-amalgamated/project-h.h' \ 46 | WITH-FILE 'expected/project-h-amalgamated.h' 47 | 48 | TEST-CASE 'amalgamate -G "" with "project-h"' 49 | USE-REQUISITES 'project-hxx' 50 | cd 'project-hxx' 51 | CHECK-COMMAND amalgamate -G '' 52 | CHECK-CONTENTS \ 53 | OF-FILE 'project-hxx-amalgamated/project-hxx.hxx' \ 54 | WITH-FILE 'expected/project-hxx-amalgamated.hxx' 55 | 56 | TEST-CASE 'amalgamate -G "" -x hpp,cpp with "project-hxx"' 57 | USE-REQUISITES 'project-hxx' 58 | cd 'project-hxx' 59 | CHECK-COMMAND amalgamate -G '' -x hpp,cpp 60 | CHECK-CONTENTS \ 61 | OF-FILE 'project-hxx-amalgamated/project-hxx.hpp' \ 62 | WITH-FILE 'expected/project-hxx-amalgamated.hpp' 63 | 64 | 65 | SECTION 'Default include guard wtih different amalgamation outputs' 66 | 67 | TEST-CASE 'amalgamate -G ""' 68 | USE-REQUISITES 'project' 69 | cd 'project' 70 | CHECK-COMMAND amalgamate -G '' 71 | CHECK-CONTENTS \ 72 | OF-FILE 'project-amalgamated/project.hpp' \ 73 | WITH-FILE 'expected/project-amalgamated-into-header.hpp' 74 | 75 | TEST-CASE 'amalgamate -G "" -S' 76 | USE-REQUISITES 'project' 77 | cd 'project' 78 | CHECK-COMMAND amalgamate -G '' -S 79 | CHECK-CONTENTS \ 80 | OF-FILE 'project-amalgamated/project.cpp' \ 81 | WITH-FILE 'expected/project-amalgamated-into-source.cpp' 82 | 83 | TEST-CASE 'amalgamate -G "" -M' 84 | USE-REQUISITES 'project' 85 | cd 'project' 86 | CHECK-COMMAND amalgamate -G '' -M 87 | CHECK-CONTENTS \ 88 | OF-FILE 'project-amalgamated/project.hpp' \ 89 | WITH-FILE 'expected/project-amalgamated-into-pair.hpp' 90 | CHECK-CONTENTS \ 91 | OF-FILE 'project-amalgamated/project.cpp' \ 92 | WITH-FILE 'expected/project-amalgamated-into-pair.cpp' 93 | 94 | 95 | SECTION 'Custom include guard identifier' 96 | 97 | TEST-CASE 'amalgamate -G "ANOTHER_INCLUDE_GUARD_ID"' 98 | USE-REQUISITES 'project' 99 | cd 'project' 100 | CHECK-COMMAND amalgamate -G 'ANOTHER_INCLUDE_GUARD_ID' 101 | CHECK-CONTENTS \ 102 | OF-FILE 'project-amalgamated/project.hpp' \ 103 | WITH-FILE 'expected/project-amalgamated-with-another-include-guard-id.hpp' 104 | 105 | TEST-CASE 'amalgamate -G "DIFFERENT_INCLUDE_GUARD_ID"' 106 | USE-REQUISITES 'project' 107 | cd 'project' 108 | CHECK-COMMAND amalgamate -G 'DIFFERENT_INCLUDE_GUARD_ID' 109 | CHECK-CONTENTS \ 110 | OF-FILE 'project-amalgamated/project.hpp' \ 111 | WITH-FILE 'expected/project-amalgamated-with-different-include-guard-id.hpp' 112 | 113 | -------------------------------------------------------------------------------- /tests/tests/inline-file.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | USE-SANDBOX 4 | 5 | SECTION 'Inlining files without testing indentation' 6 | 7 | TEST-CASE 'inline-file() with "one.hpp"' 8 | USE-REQUISITES 'one.hpp' 9 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" '' 10 | CHECK-CONTENTS \ 11 | OF-FILE 'result.hpp' \ 12 | WITH-FILE 'expected/one-inlined.hpp' 13 | 14 | TEST-CASE 'inline-file() with "one.hpp", "two.hpp"' 15 | USE-REQUISITES 'one.hpp' 'two.hpp' 16 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" '' 17 | inline-file "$SANDBOX_ROOT/two.hpp" "$SANDBOX_ROOT/result.hpp" '' 18 | CHECK-CONTENTS \ 19 | OF-FILE 'result.hpp' \ 20 | WITH-FILE 'expected/one-two-inlined.hpp' 21 | 22 | TEST-CASE 'inline-file() with "one.hpp", "two.hpp"' 23 | USE-REQUISITES 'one.hpp' 'two.hpp' 'three.hpp' 24 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" '' 25 | inline-file "$SANDBOX_ROOT/two.hpp" "$SANDBOX_ROOT/result.hpp" '' 26 | inline-file "$SANDBOX_ROOT/three.hpp" "$SANDBOX_ROOT/result.hpp" '' 27 | CHECK-CONTENTS \ 28 | OF-FILE 'result.hpp' \ 29 | WITH-FILE 'expected/one-two-three-inlined.hpp' 30 | 31 | 32 | SECTION 'Inlining files and using indentation' 33 | 34 | TEST-CASE 'inline-file() with double-space as indent' 35 | USE-REQUISITES 'one.hpp' 36 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 37 | CHECK-CONTENTS \ 38 | OF-FILE 'result.hpp' \ 39 | WITH-FILE 'expected/one-inlined-with-double-space-indent.hpp' 40 | 41 | TEST-CASE 'inline-file() with quad-space as indent' 42 | USE-REQUISITES 'one.hpp' 43 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 44 | CHECK-CONTENTS \ 45 | OF-FILE 'result.hpp' \ 46 | WITH-FILE 'expected/one-inlined-with-quad-space-indent.hpp' 47 | 48 | TEST-CASE 'inline-file() with "one.hpp", "two.hpp" and double-space indent' 49 | USE-REQUISITES 'one.hpp' 'two.hpp' 50 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 51 | inline-file "$SANDBOX_ROOT/two.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 52 | CHECK-CONTENTS \ 53 | OF-FILE 'result.hpp' \ 54 | WITH-FILE 'expected/one-two-inlined-with-double-space-indent.hpp' 55 | 56 | 57 | SECTION 'Inlining files and using different indentations for each one' 58 | 59 | TEST-CASE 'inline-file() with "one.hpp", "two.hpp", "three.hpp" and quad-space indent' 60 | USE-REQUISITES 'one.hpp' 'two.hpp' 'three.hpp' 61 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 62 | inline-file "$SANDBOX_ROOT/two.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 63 | inline-file "$SANDBOX_ROOT/three.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 64 | CHECK-CONTENTS \ 65 | OF-FILE 'result.hpp' \ 66 | WITH-FILE 'expected/one-two-three-inlined-with-quad-space-indent.hpp' 67 | 68 | TEST-CASE 'inline-file() with "one.hpp", "two.hpp", "three.hpp" and mixed indent (variant 1)' 69 | USE-REQUISITES 'one.hpp' 'two.hpp' 'three.hpp' 70 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 71 | inline-file "$SANDBOX_ROOT/two.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 72 | inline-file "$SANDBOX_ROOT/three.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 73 | CHECK-CONTENTS \ 74 | OF-FILE 'result.hpp' \ 75 | WITH-FILE 'expected/one-two-three-inlined-with-mixed-indent-variant-1.hpp' 76 | 77 | TEST-CASE 'inline-file() with "one.hpp", "two.hpp", "three.hpp" and mixed indent (variant 2)' 78 | USE-REQUISITES 'one.hpp' 'two.hpp' 'three.hpp' 79 | inline-file "$SANDBOX_ROOT/one.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 80 | inline-file "$SANDBOX_ROOT/two.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 81 | inline-file "$SANDBOX_ROOT/three.hpp" "$SANDBOX_ROOT/result.hpp" ' ' 82 | CHECK-CONTENTS \ 83 | OF-FILE 'result.hpp' \ 84 | WITH-FILE 'expected/one-two-three-inlined-with-mixed-indent-variant-2.hpp' 85 | 86 | -------------------------------------------------------------------------------- /tests/tests/input-directory-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate with "first" project' 4 | USE-REQUISITES 'first' 5 | cd 'first' 6 | CHECK-COMMAND amalgamate 7 | CHECK-CONTENTS \ 8 | OF-FILE 'first-amalgamated/first.hpp' \ 9 | WITH-FILE 'expected/first-amalgamated.hpp' 10 | 11 | TEST-CASE 'amalgamate -i with "second" project' 12 | USE-REQUISITES 'second' 13 | cd 'second' 14 | CHECK-COMMAND amalgamate -i src 15 | CHECK-CONTENTS \ 16 | OF-FILE 'second-amalgamated/second.hpp' \ 17 | WITH-FILE 'expected/second-amalgamated.hpp' 18 | 19 | TEST-CASE 'amalgamate -i with "third" project' 20 | USE-REQUISITES 'third' 21 | cd 'third' 22 | CHECK-COMMAND amalgamate -i sources 23 | CHECK-CONTENTS \ 24 | OF-FILE 'third-amalgamated/third.hpp' \ 25 | WITH-FILE 'expected/third-amalgamated.hpp' 26 | 27 | -------------------------------------------------------------------------------- /tests/tests/input-header-and-source-extension-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -e h -s c -M' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -e h -s c -M 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.h' \ 9 | WITH-FILE 'expected/project-h-c-amalgamated.h' 10 | CHECK-CONTENTS \ 11 | OF-FILE 'project-amalgamated/project.c' \ 12 | WITH-FILE 'expected/project-h-c-amalgamated.c' 13 | 14 | TEST-CASE 'amalgamate -e hpp -s cpp -M' 15 | USE-REQUISITES 'project' 16 | cd 'project' 17 | CHECK-COMMAND amalgamate -e hpp -s cpp -M 18 | CHECK-CONTENTS \ 19 | OF-FILE 'project-amalgamated/project.hpp' \ 20 | WITH-FILE 'expected/project-hpp-cpp-amalgamated.hpp' 21 | CHECK-CONTENTS \ 22 | OF-FILE 'project-amalgamated/project.cpp' \ 23 | WITH-FILE 'expected/project-hpp-cpp-amalgamated.cpp' 24 | 25 | TEST-CASE 'amalgamate -e hxx -s cxx -M' 26 | USE-REQUISITES 'project' 27 | cd 'project' 28 | CHECK-COMMAND amalgamate -e hxx -s cxx -M 29 | CHECK-CONTENTS \ 30 | OF-FILE 'project-amalgamated/project.hxx' \ 31 | WITH-FILE 'expected/project-hxx-cxx-amalgamated.hxx' 32 | CHECK-CONTENTS \ 33 | OF-FILE 'project-amalgamated/project.cxx' \ 34 | WITH-FILE 'expected/project-hxx-cxx-amalgamated.cxx' 35 | 36 | TEST-CASE 'amalgamate -e h++ -s c++ -M' 37 | USE-REQUISITES 'project' 38 | cd 'project' 39 | CHECK-COMMAND amalgamate -e h++ -s c++ -M 40 | CHECK-CONTENTS \ 41 | OF-FILE 'project-amalgamated/project.h++' \ 42 | WITH-FILE 'expected/project-h++-c++-amalgamated.h++' 43 | CHECK-CONTENTS \ 44 | OF-FILE 'project-amalgamated/project.c++' \ 45 | WITH-FILE 'expected/project-h++-c++-amalgamated.c++' 46 | 47 | -------------------------------------------------------------------------------- /tests/tests/input-header-extension-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | SECTION 'Generating single header' 4 | 5 | TEST-CASE 'amalgamate -e h' 6 | USE-REQUISITES 'project' 7 | cd 'project' 8 | CHECK-COMMAND amalgamate -e h 9 | CHECK-CONTENTS \ 10 | OF-FILE 'project-amalgamated/project.h' \ 11 | WITH-FILE 'expected/project-h-amalgamated.h' 12 | 13 | TEST-CASE 'amalgamate -e hpp' 14 | USE-REQUISITES 'project' 15 | cd 'project' 16 | CHECK-COMMAND amalgamate -e hpp 17 | CHECK-CONTENTS \ 18 | OF-FILE 'project-amalgamated/project.hpp' \ 19 | WITH-FILE 'expected/project-hpp-amalgamated.hpp' 20 | 21 | TEST-CASE 'amalgamate -e hxx' 22 | USE-REQUISITES 'project' 23 | cd 'project' 24 | CHECK-COMMAND amalgamate -e hxx 25 | CHECK-CONTENTS \ 26 | OF-FILE 'project-amalgamated/project.hxx' \ 27 | WITH-FILE 'expected/project-hxx-amalgamated.hxx' 28 | 29 | TEST-CASE 'amalgamate -e h++' 30 | USE-REQUISITES 'project' 31 | cd 'project' 32 | CHECK-COMMAND amalgamate -e h++ 33 | CHECK-CONTENTS \ 34 | OF-FILE 'project-amalgamated/project.h++' \ 35 | WITH-FILE 'expected/project-h++-amalgamated.h++' 36 | 37 | 38 | SECTION 'Generating single source' 39 | 40 | TEST-CASE 'amalgamate -e h -S' 41 | USE-REQUISITES 'project' 42 | cd 'project' 43 | CHECK-COMMAND amalgamate -e h -S 44 | CHECK-CONTENTS \ 45 | OF-FILE 'project-amalgamated/project.cpp' \ 46 | WITH-FILE 'expected/project-h-amalgamated.cpp' 47 | 48 | TEST-CASE 'amalgamate -e hpp -S' 49 | USE-REQUISITES 'project' 50 | cd 'project' 51 | CHECK-COMMAND amalgamate -e hpp -S 52 | CHECK-CONTENTS \ 53 | OF-FILE 'project-amalgamated/project.cpp' \ 54 | WITH-FILE 'expected/project-hpp-amalgamated.cpp' 55 | 56 | TEST-CASE 'amalgamate -e hxx -S' 57 | USE-REQUISITES 'project' 58 | cd 'project' 59 | CHECK-COMMAND amalgamate -e hxx -S 60 | CHECK-CONTENTS \ 61 | OF-FILE 'project-amalgamated/project.cpp' \ 62 | WITH-FILE 'expected/project-hxx-amalgamated.cpp' 63 | 64 | TEST-CASE 'amalgamate -e h++ -S' 65 | USE-REQUISITES 'project' 66 | cd 'project' 67 | CHECK-COMMAND amalgamate -e h++ -S 68 | CHECK-CONTENTS \ 69 | OF-FILE 'project-amalgamated/project.cpp' \ 70 | WITH-FILE 'expected/project-h++-amalgamated.cpp' 71 | 72 | 73 | SECTION 'Generating pair with only header extension specified' 74 | 75 | TEST-CASE 'amalgamate -e h -M' 76 | USE-REQUISITES 'project' 77 | cd 'project' 78 | CHECK-COMMAND amalgamate -e h -M 79 | CHECK-CONTENTS \ 80 | OF-FILE 'project-amalgamated/project.h' \ 81 | WITH-FILE 'expected/project-h-and-all-sources-amalgamated.h' 82 | CHECK-CONTENTS \ 83 | OF-FILE 'project-amalgamated/project.cpp' \ 84 | WITH-FILE 'expected/project-h-and-all-sources-amalgamated.cpp' 85 | 86 | TEST-CASE 'amalgamate -e hpp -M' 87 | USE-REQUISITES 'project' 88 | cd 'project' 89 | CHECK-COMMAND amalgamate -e hpp -M 90 | CHECK-CONTENTS \ 91 | OF-FILE 'project-amalgamated/project.hpp' \ 92 | WITH-FILE 'expected/project-hpp-and-all-sources-amalgamated.hpp' 93 | CHECK-CONTENTS \ 94 | OF-FILE 'project-amalgamated/project.cpp' \ 95 | WITH-FILE 'expected/project-hpp-and-all-sources-amalgamated.cpp' 96 | 97 | TEST-CASE 'amalgamate -e hxx -M' 98 | USE-REQUISITES 'project' 99 | cd 'project' 100 | CHECK-COMMAND amalgamate -e hxx -M 101 | CHECK-CONTENTS \ 102 | OF-FILE 'project-amalgamated/project.hxx' \ 103 | WITH-FILE 'expected/project-hxx-and-all-sources-amalgamated.hxx' 104 | CHECK-CONTENTS \ 105 | OF-FILE 'project-amalgamated/project.cpp' \ 106 | WITH-FILE 'expected/project-hxx-and-all-sources-amalgamated.cpp' 107 | 108 | TEST-CASE 'amalgamate -e h++ -M' 109 | USE-REQUISITES 'project' 110 | cd 'project' 111 | CHECK-COMMAND amalgamate -e h++ -M 112 | CHECK-CONTENTS \ 113 | OF-FILE 'project-amalgamated/project.h++' \ 114 | WITH-FILE 'expected/project-h++-and-all-sources-amalgamated.h++' 115 | CHECK-CONTENTS \ 116 | OF-FILE 'project-amalgamated/project.cpp' \ 117 | WITH-FILE 'expected/project-h++-and-all-sources-amalgamated.cpp' 118 | 119 | -------------------------------------------------------------------------------- /tests/tests/input-source-extension-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | SECTION 'Generating single source' 4 | 5 | TEST-CASE 'amalgamate -s c -S' 6 | USE-REQUISITES 'project' 7 | cd 'project' 8 | CHECK-COMMAND amalgamate -s c -S 9 | CHECK-CONTENTS \ 10 | OF-FILE 'project-amalgamated/project.c' \ 11 | WITH-FILE 'expected/project-c-amalgamated.c' 12 | 13 | TEST-CASE 'amalgamate -s cpp -S' 14 | USE-REQUISITES 'project' 15 | cd 'project' 16 | CHECK-COMMAND amalgamate -s cpp -S 17 | CHECK-CONTENTS \ 18 | OF-FILE 'project-amalgamated/project.cpp' \ 19 | WITH-FILE 'expected/project-cpp-amalgamated.cpp' 20 | 21 | TEST-CASE 'amalgamate -s cxx -S' 22 | USE-REQUISITES 'project' 23 | cd 'project' 24 | CHECK-COMMAND amalgamate -s cxx -S 25 | CHECK-CONTENTS \ 26 | OF-FILE 'project-amalgamated/project.cxx' \ 27 | WITH-FILE 'expected/project-cxx-amalgamated.cxx' 28 | 29 | TEST-CASE 'amalgamate -s c++ -S' 30 | USE-REQUISITES 'project' 31 | cd 'project' 32 | CHECK-COMMAND amalgamate -s c++ -S 33 | CHECK-CONTENTS \ 34 | OF-FILE 'project-amalgamated/project.c++' \ 35 | WITH-FILE 'expected/project-c++-amalgamated.c++' 36 | 37 | 38 | SECTION 'Generating single header' 39 | 40 | TEST-CASE 'amalgamate -s c' 41 | USE-REQUISITES 'project' 42 | cd 'project' 43 | CHECK-COMMAND amalgamate -s c 44 | CHECK-CONTENTS \ 45 | OF-FILE 'project-amalgamated/project.h' \ 46 | WITH-FILE 'expected/project-c-amalgamated.h' 47 | 48 | TEST-CASE 'amalgamate -s cpp -S' 49 | USE-REQUISITES 'project' 50 | cd 'project' 51 | CHECK-COMMAND amalgamate -s cpp 52 | CHECK-CONTENTS \ 53 | OF-FILE 'project-amalgamated/project.h' \ 54 | WITH-FILE 'expected/project-cpp-amalgamated.h' 55 | 56 | TEST-CASE 'amalgamate -s cxx' 57 | USE-REQUISITES 'project' 58 | cd 'project' 59 | CHECK-COMMAND amalgamate -s cxx 60 | CHECK-CONTENTS \ 61 | OF-FILE 'project-amalgamated/project.h' \ 62 | WITH-FILE 'expected/project-cxx-amalgamated.h' 63 | 64 | TEST-CASE 'amalgamate -s c++' 65 | USE-REQUISITES 'project' 66 | cd 'project' 67 | CHECK-COMMAND amalgamate -s c++ 68 | CHECK-CONTENTS \ 69 | OF-FILE 'project-amalgamated/project.h' \ 70 | WITH-FILE 'expected/project-c++-amalgamated.h' 71 | 72 | 73 | SECTION 'Generating pair with only source extension specified' 74 | 75 | TEST-CASE 'amalgamate -s c -M' 76 | USE-REQUISITES 'project' 77 | cd 'project' 78 | CHECK-COMMAND amalgamate -s c -M 79 | CHECK-CONTENTS \ 80 | OF-FILE 'project-amalgamated/project.h' \ 81 | WITH-FILE 'expected/project-all-headers-and-c-amalgamated.h' 82 | CHECK-CONTENTS \ 83 | OF-FILE 'project-amalgamated/project.c' \ 84 | WITH-FILE 'expected/project-all-headers-and-c-amalgamated.c' 85 | 86 | TEST-CASE 'amalgamate -s cpp -M' 87 | USE-REQUISITES 'project' 88 | cd 'project' 89 | CHECK-COMMAND amalgamate -s cpp -M 90 | CHECK-CONTENTS \ 91 | OF-FILE 'project-amalgamated/project.h' \ 92 | WITH-FILE 'expected/project-all-headers-and-cpp-amalgamated.h' 93 | CHECK-CONTENTS \ 94 | OF-FILE 'project-amalgamated/project.cpp' \ 95 | WITH-FILE 'expected/project-all-headers-and-cpp-amalgamated.cpp' 96 | 97 | TEST-CASE 'amalgamate -s cxx -M' 98 | USE-REQUISITES 'project' 99 | cd 'project' 100 | CHECK-COMMAND amalgamate -s cxx -M 101 | CHECK-CONTENTS \ 102 | OF-FILE 'project-amalgamated/project.h' \ 103 | WITH-FILE 'expected/project-all-headers-and-cxx-amalgamated.h' 104 | CHECK-CONTENTS \ 105 | OF-FILE 'project-amalgamated/project.cxx' \ 106 | WITH-FILE 'expected/project-all-headers-and-cxx-amalgamated.cxx' 107 | 108 | TEST-CASE 'amalgamate -s c++ -M' 109 | USE-REQUISITES 'project' 110 | cd 'project' 111 | CHECK-COMMAND amalgamate -s c++ -M 112 | CHECK-CONTENTS \ 113 | OF-FILE 'project-amalgamated/project.h' \ 114 | WITH-FILE 'expected/project-all-headers-and-c++-amalgamated.h' 115 | CHECK-CONTENTS \ 116 | OF-FILE 'project-amalgamated/project.c++' \ 117 | WITH-FILE 'expected/project-all-headers-and-c++-amalgamated.c++' 118 | 119 | -------------------------------------------------------------------------------- /tests/tests/insert-annotations-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -a' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -a 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated.hpp' 10 | 11 | -------------------------------------------------------------------------------- /tests/tests/interlude-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -L "interlude-one.txt"' 4 | USE-REQUISITES 'project' 'interlude-one.txt' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -L '../interlude-one.txt' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated-into-header-interlude-one.hpp' 10 | 11 | TEST-CASE 'amalgamate -L "interlude-two.txt"' 12 | USE-REQUISITES 'project' 'interlude-two.txt' 13 | cd 'project' 14 | CHECK-COMMAND amalgamate -L '../interlude-two.txt' 15 | CHECK-CONTENTS \ 16 | OF-FILE 'project-amalgamated/project.hpp' \ 17 | WITH-FILE 'expected/project-amalgamated-into-header-interlude-two.hpp' 18 | 19 | TEST-CASE 'amalgamate -L "interlude-one.txt" -S' 20 | USE-REQUISITES 'project' 'interlude-one.txt' 21 | cd 'project' 22 | CHECK-COMMAND amalgamate -L '../interlude-one.txt' -S 23 | CHECK-CONTENTS \ 24 | OF-FILE 'project-amalgamated/project.cpp' \ 25 | WITH-FILE 'expected/project-amalgamated-into-source-interlude-one.cpp' 26 | 27 | TEST-CASE 'amalgamate -L "interlude-one.txt" -M' 28 | USE-REQUISITES 'project' 'interlude-one.txt' 29 | cd 'project' 30 | CHECK-COMMAND amalgamate -L '../interlude-one.txt' -M 31 | CHECK-CONTENTS \ 32 | OF-FILE 'project-amalgamated/project.hpp' \ 33 | WITH-FILE 'expected/project-amalgamated-into-pair-interlude-one.hpp' 34 | CHECK-CONTENTS \ 35 | OF-FILE 'project-amalgamated/project.cpp' \ 36 | WITH-FILE 'expected/project-amalgamated-into-pair-interlude-one.cpp' 37 | 38 | -------------------------------------------------------------------------------- /tests/tests/into-header-source-pair-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate "header-only" project' 4 | USE-REQUISITES 'header-only' 5 | cd 'header-only' 6 | CHECK-COMMAND amalgamate -M 7 | CHECK-CONTENTS \ 8 | OF-FILE 'header-only-amalgamated/header-only.hpp' \ 9 | WITH-FILE 'expected/header-only-amalgamated.hpp' 10 | CHECK-CONTENTS \ 11 | OF-FILE 'header-only-amalgamated/header-only.cpp' \ 12 | WITH-FILE 'expected/header-only-amalgamated.cpp' 13 | 14 | TEST-CASE 'amalgamate "source-only" project' 15 | USE-REQUISITES 'source-only' 16 | cd 'source-only' 17 | CHECK-COMMAND amalgamate -M 18 | CHECK-CONTENTS \ 19 | OF-FILE 'source-only-amalgamated/source-only.h' \ 20 | WITH-FILE 'expected/source-only-amalgamated.h' 21 | CHECK-CONTENTS \ 22 | OF-FILE 'source-only-amalgamated/source-only.cpp' \ 23 | WITH-FILE 'expected/source-only-amalgamated.cpp' 24 | 25 | TEST-CASE 'amalgamate "header-and-source" project' 26 | USE-REQUISITES 'header-and-source' 27 | cd 'header-and-source' 28 | CHECK-COMMAND amalgamate -M 29 | CHECK-CONTENTS \ 30 | OF-FILE 'header-and-source-amalgamated/header-and-source.hpp' \ 31 | WITH-FILE 'expected/header-and-source-amalgamated.hpp' 32 | CHECK-CONTENTS \ 33 | OF-FILE 'header-and-source-amalgamated/header-and-source.cpp' \ 34 | WITH-FILE 'expected/header-and-source-amalgamated.cpp' 35 | 36 | -------------------------------------------------------------------------------- /tests/tests/into-single-header-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate "header-only" project' 4 | USE-REQUISITES 'header-only' 5 | cd 'header-only' 6 | CHECK-COMMAND amalgamate 7 | CHECK-CONTENTS \ 8 | OF-FILE 'header-only-amalgamated/header-only.hpp' \ 9 | WITH-FILE 'expected/header-only-amalgamated.hpp' 10 | CHECK ! [ -r 'header-only-amalgamated/header-only.cpp' ] 11 | 12 | TEST-CASE 'amalgamate "source-only" project' 13 | USE-REQUISITES 'source-only' 14 | cd 'source-only' 15 | CHECK-COMMAND amalgamate 16 | CHECK-CONTENTS \ 17 | OF-FILE 'source-only-amalgamated/source-only.h' \ 18 | WITH-FILE 'expected/source-only-amalgamated.h' 19 | CHECK ! [ -r 'source-only-amalgamated/source-only.cpp' ] 20 | 21 | TEST-CASE 'amalgamate "header-and-source" project' 22 | USE-REQUISITES 'header-and-source' 23 | cd 'header-and-source' 24 | CHECK-COMMAND amalgamate 25 | CHECK-CONTENTS \ 26 | OF-FILE 'header-and-source-amalgamated/header-and-source.hpp' \ 27 | WITH-FILE 'expected/header-and-source-amalgamated.hpp' 28 | CHECK ! [ -r 'header-and-source-amalgamated/header-and-source.cpp' ] 29 | -------------------------------------------------------------------------------- /tests/tests/into-single-source-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate "header-only" project' 4 | USE-REQUISITES 'header-only' 5 | cd 'header-only' 6 | CHECK-COMMAND amalgamate -S 7 | CHECK-CONTENTS \ 8 | OF-FILE 'header-only-amalgamated/header-only.cpp' \ 9 | WITH-FILE 'expected/header-only-amalgamated.cpp' 10 | CHECK ! [ -r 'header-only-amalgamated/header-only.hpp' ] 11 | 12 | TEST-CASE 'amalgamate "source-only" project' 13 | USE-REQUISITES 'source-only' 14 | cd 'source-only' 15 | CHECK-COMMAND amalgamate -S 16 | CHECK-CONTENTS \ 17 | OF-FILE 'source-only-amalgamated/source-only.cpp' \ 18 | WITH-FILE 'expected/source-only-amalgamated.cpp' 19 | CHECK ! [ -r 'source-only-amalgamated/source-only.h' ] 20 | 21 | TEST-CASE 'amalgamate "header-and-source" project' 22 | USE-REQUISITES 'header-and-source' 23 | cd 'header-and-source' 24 | CHECK-COMMAND amalgamate -S 25 | CHECK-CONTENTS \ 26 | OF-FILE 'header-and-source-amalgamated/header-and-source.cpp' \ 27 | WITH-FILE 'expected/header-and-source-amalgamated.cpp' 28 | CHECK ! [ -r 'header-and-source-amalgamated/header-and-source.hpp' ] 29 | 30 | -------------------------------------------------------------------------------- /tests/tests/is-blank-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'is-blank-line() with empty string' 4 | CHECK is-blank-line '' 5 | 6 | TEST-CASE 'is-blank-line() with spaces"' 7 | CHECK is-blank-line ' ' 8 | CHECK is-blank-line ' ' 9 | 10 | TEST-CASE 'is-blank-line() with tabs' 11 | CHECK is-blank-line $'\t' 12 | CHECK is-blank-line $'\t\t' 13 | 14 | TEST-CASE 'is-blank-line() with spaces and tabs' 15 | CHECK is-blank-line $' \t' 16 | CHECK is-blank-line $'\t ' 17 | CHECK is-blank-line $' \t \t' 18 | CHECK is-blank-line $'\t \t ' 19 | 20 | TEST-CASE 'is-blank-line() with non-space only' 21 | CHECK ! is-blank-line 'a' 22 | CHECK ! is-blank-line 'aa' 23 | CHECK ! is-blank-line 'aaa' 24 | 25 | TEST-CASE 'is-blank-line() with non-space and space' 26 | CHECK ! is-blank-line ' a' 27 | CHECK ! is-blank-line 'a ' 28 | CHECK ! is-blank-line ' a ' 29 | CHECK ! is-blank-line ' a ' 30 | CHECK ! is-blank-line 'a a' 31 | CHECK ! is-blank-line 'aa aa' 32 | 33 | TEST-CASE 'is-blank-line() with non-space and tab' 34 | CHECK ! is-blank-line $'\ta' 35 | CHECK ! is-blank-line $'a\t' 36 | CHECK ! is-blank-line $'\ta\t' 37 | CHECK ! is-blank-line $'\t\ta\t\t' 38 | CHECK ! is-blank-line $'a\ta' 39 | CHECK ! is-blank-line $'aa\taa' 40 | 41 | TEST-CASE 'is-blank-line() with non-space, space and tab' 42 | CHECK ! is-blank-line $' \ta' 43 | CHECK ! is-blank-line $'a \t' 44 | CHECK ! is-blank-line $'\t a' 45 | CHECK ! is-blank-line $'a\t ' 46 | CHECK ! is-blank-line $' \ta \t' 47 | CHECK ! is-blank-line $'\t a\t ' 48 | CHECK ! is-blank-line $' a\t\t' 49 | CHECK ! is-blank-line $'\t\ta ' 50 | 51 | -------------------------------------------------------------------------------- /tests/tests/is-include-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'is-include-line() with non-standard include line' 4 | CHECK is-include-line $'#include"not-iostream.hpp"' 5 | 6 | CHECK is-include-line $' #include "not-iostream.hpp"' 7 | CHECK is-include-line $' #include "not-iostream.hpp"' 8 | CHECK is-include-line $'\t#include "not-iostream.hpp"' 9 | CHECK is-include-line $'\t\t#include "not-iostream.hpp"' 10 | 11 | CHECK is-include-line $'#include "not-iostream.hpp"' 12 | CHECK is-include-line $'#include "not-iostream.hpp"' 13 | CHECK is-include-line $'#include\t"not-iostream.hpp"' 14 | CHECK is-include-line $'#include\t\t"not-iostream.hpp"' 15 | 16 | CHECK is-include-line $'#include "not-iostream.hpp" ' 17 | CHECK is-include-line $'#include "not-iostream.hpp" ' 18 | CHECK is-include-line $'#include "not-iostream.hpp"\t' 19 | CHECK is-include-line $'#include "not-iostream.hpp"\t\t' 20 | 21 | CHECK is-include-line $' #include "not-iostream.hpp" ' 22 | CHECK is-include-line $' #include "not-iostream.hpp" ' 23 | CHECK is-include-line $'\t#include\t"not-iostream.hpp"\t' 24 | CHECK is-include-line $'\t\t#include\t\t"not-iostream.hpp"\t\t' 25 | 26 | CHECK is-include-line $' \t#include \t"not-iostream.hpp" \t' 27 | CHECK is-include-line $'\t #include\t "not-iostream.hpp"\t ' 28 | 29 | TEST-CASE 'is-include-line() with include line with non-alpha path' 30 | CHECK is-include-line $'#include "io-stream"' 31 | CHECK is-include-line $'#include "io/stream"' 32 | CHECK is-include-line $'#include "iostream.hpp"' 33 | CHECK is-include-line $'#include "iostream.h++"' 34 | CHECK is-include-line $'#include "iostream.v2"' 35 | 36 | TEST-CASE 'is-include-line() with include line' 37 | CHECK ! is-include-line $'#include' 38 | 39 | CHECK ! is-include-line $' #include ' 40 | CHECK ! is-include-line $' #include ' 41 | CHECK ! is-include-line $'\t#include ' 42 | CHECK ! is-include-line $'\t\t#include ' 43 | 44 | CHECK ! is-include-line $'#include ' 45 | CHECK ! is-include-line $'#include ' 46 | CHECK ! is-include-line $'#include\t' 47 | CHECK ! is-include-line $'#include\t\t' 48 | 49 | CHECK ! is-include-line $'#include ' 50 | CHECK ! is-include-line $'#include ' 51 | CHECK ! is-include-line $'#include \t' 52 | CHECK ! is-include-line $'#include \t\t' 53 | 54 | CHECK ! is-include-line $' #include ' 55 | CHECK ! is-include-line $' #include ' 56 | CHECK ! is-include-line $'\t#include\t\t' 57 | CHECK ! is-include-line $'\t\t#include\t\t\t\t' 58 | 59 | CHECK ! is-include-line $' \t#include \t \t' 60 | CHECK ! is-include-line $'\t #include\t \t ' 61 | 62 | TEST-CASE 'is-include-line() with malformed include line' 63 | CHECK ! is-include-line $'#include"iostream' 64 | CHECK ! is-include-line $'#include iostream"' 65 | CHECK ! is-include-line $'#include ""' 66 | CHECK ! is-include-line $'#include " "' 67 | 68 | -------------------------------------------------------------------------------- /tests/tests/is-pragma-once-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'is-pragma-once() with correct "#pragma once" line' 4 | CHECK is-pragma-once-line $' #pragma once' 5 | CHECK is-pragma-once-line $' #pragma once' 6 | CHECK is-pragma-once-line $'\t#pragma once' 7 | CHECK is-pragma-once-line $'\t\t#pragma once' 8 | 9 | CHECK is-pragma-once-line $'#pragma once' 10 | CHECK is-pragma-once-line $'#pragma once' 11 | CHECK is-pragma-once-line $'#pragma\tonce' 12 | CHECK is-pragma-once-line $'#pragma\t\tonce' 13 | 14 | CHECK is-pragma-once-line $'#pragma once ' 15 | CHECK is-pragma-once-line $'#pragma once ' 16 | CHECK is-pragma-once-line $'#pragma once\t' 17 | CHECK is-pragma-once-line $'#pragma once\t\t' 18 | 19 | CHECK is-pragma-once-line $' #pragma once ' 20 | CHECK is-pragma-once-line $' #pragma once ' 21 | CHECK is-pragma-once-line $'\t#pragma\tonce\t' 22 | CHECK is-pragma-once-line $'\t\t#pragma\t\tonce\t\t' 23 | 24 | CHECK is-pragma-once-line $' \t#pragma \tonce \t' 25 | CHECK is-pragma-once-line $'\t #pragma\t once\t ' 26 | 27 | TEST-CASE 'is-pragma-once() with malformed "#pragma once" line' 28 | CHECK ! is-pragma-once-line $'#pragmaonce' 29 | CHECK ! is-pragma-once-line $'#pragma twice' 30 | 31 | -------------------------------------------------------------------------------- /tests/tests/is-standard-include-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'is-standard-include-line() with standard include line' 4 | CHECK is-standard-include-line $'#include' 5 | 6 | CHECK is-standard-include-line $' #include ' 7 | CHECK is-standard-include-line $' #include ' 8 | CHECK is-standard-include-line $'\t#include ' 9 | CHECK is-standard-include-line $'\t\t#include ' 10 | 11 | CHECK is-standard-include-line $'#include ' 12 | CHECK is-standard-include-line $'#include ' 13 | CHECK is-standard-include-line $'#include\t' 14 | CHECK is-standard-include-line $'#include\t\t' 15 | 16 | CHECK is-standard-include-line $'#include ' 17 | CHECK is-standard-include-line $'#include ' 18 | CHECK is-standard-include-line $'#include \t' 19 | CHECK is-standard-include-line $'#include \t\t' 20 | 21 | CHECK is-standard-include-line $' #include ' 22 | CHECK is-standard-include-line $' #include ' 23 | CHECK is-standard-include-line $'\t#include\t\t' 24 | CHECK is-standard-include-line $'\t\t#include\t\t\t\t' 25 | 26 | CHECK is-standard-include-line $' \t#include \t \t' 27 | CHECK is-standard-include-line $'\t #include\t \t ' 28 | 29 | TEST-CASE 'is-standard-include-line() with standard include line with non-alpha path' 30 | CHECK is-standard-include-line $'#include ' 31 | CHECK is-standard-include-line $'#include ' 32 | CHECK is-standard-include-line $'#include ' 33 | CHECK is-standard-include-line $'#include ' 34 | CHECK is-standard-include-line $'#include ' 35 | 36 | TEST-CASE 'is-standard-include-line() with non-standard include line' 37 | CHECK ! is-standard-include-line $'#include"not-iostream.hpp"' 38 | 39 | CHECK ! is-standard-include-line $' #include "not-iostream.hpp"' 40 | CHECK ! is-standard-include-line $' #include "not-iostream.hpp"' 41 | CHECK ! is-standard-include-line $'\t#include "not-iostream.hpp"' 42 | CHECK ! is-standard-include-line $'\t\t#include "not-iostream.hpp"' 43 | 44 | CHECK ! is-standard-include-line $'#include "not-iostream.hpp"' 45 | CHECK ! is-standard-include-line $'#include "not-iostream.hpp"' 46 | CHECK ! is-standard-include-line $'#include\t"not-iostream.hpp"' 47 | CHECK ! is-standard-include-line $'#include\t\t"not-iostream.hpp"' 48 | 49 | CHECK ! is-standard-include-line $'#include "not-iostream.hpp" ' 50 | CHECK ! is-standard-include-line $'#include "not-iostream.hpp" ' 51 | CHECK ! is-standard-include-line $'#include "not-iostream.hpp"\t' 52 | CHECK ! is-standard-include-line $'#include "not-iostream.hpp"\t\t' 53 | 54 | CHECK ! is-standard-include-line $' #include "not-iostream.hpp" ' 55 | CHECK ! is-standard-include-line $' #include "not-iostream.hpp" ' 56 | CHECK ! is-standard-include-line $'\t#include\t"not-iostream.hpp"\t' 57 | CHECK ! is-standard-include-line $'\t\t#include\t\t"not-iostream.hpp"\t\t' 58 | 59 | CHECK ! is-standard-include-line $' \t#include \t"not-iostream.hpp" \t' 60 | CHECK ! is-standard-include-line $'\t #include\t "not-iostream.hpp"\t ' 61 | 62 | TEST-CASE 'is-standard-include-line() with malformed standard include line' 63 | CHECK ! is-standard-include-line $'#include' 65 | CHECK ! is-standard-include-line $'#include <>' 66 | CHECK ! is-standard-include-line $'#include < >' 67 | 68 | -------------------------------------------------------------------------------- /tests/tests/make-include-guard-id.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'make-include-guard-id() with simple file name' 4 | result=$(make-include-guard-id 'header') 5 | CHECK [ "$result" == 'HEADER_INCLUDED' ] 6 | 7 | result=$(make-include-guard-id 'Header') 8 | CHECK [ "$result" == 'HEADER_INCLUDED' ] 9 | 10 | TEST-CASE 'make-include-guard-id() with "." in the file name' 11 | result=$(make-include-guard-id 'header.hpp') 12 | CHECK [ "$result" == 'HEADER_HPP_INCLUDED' ] 13 | 14 | TEST-CASE 'make-include-guard-id() with "-" in the file name' 15 | result=$(make-include-guard-id 'some-header') 16 | CHECK [ "$result" == 'SOME_HEADER_INCLUDED' ] 17 | 18 | TEST-CASE 'make-include-guard-id() with "(" in the file name' 19 | result=$(make-include-guard-id 'some(header') 20 | CHECK [ "$result" == 'SOME_HEADER_INCLUDED' ] 21 | 22 | TEST-CASE 'make-include-guard-id() with ")" in the file name' 23 | result=$(make-include-guard-id 'some)header') 24 | CHECK [ "$result" == 'SOME_HEADER_INCLUDED' ] 25 | 26 | TEST-CASE 'make-include-guard-id() with "_" in the file name' 27 | result=$(make-include-guard-id 'some_header') 28 | CHECK [ "$result" == 'SOME_HEADER_INCLUDED' ] 29 | 30 | TEST-CASE 'make-include-guard-id() with all of the above' 31 | result=$(make-include-guard-id 'some-header.hpp') 32 | CHECK [ "$result" == 'SOME_HEADER_HPP_INCLUDED' ] 33 | 34 | result=$(make-include-guard-id 'some_header.hpp') 35 | CHECK [ "$result" == 'SOME_HEADER_HPP_INCLUDED' ] 36 | 37 | -------------------------------------------------------------------------------- /tests/tests/output-directory-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -o ""' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | mkdir 'build' 7 | CHECK-COMMAND amalgamate -o 'build' 8 | CHECK-CONTENTS \ 9 | OF-FILE 'build/project-amalgamated/project.hpp' \ 10 | WITH-FILE 'expected/project-amalgamated.hpp' 11 | 12 | TEST-CASE 'amalgamate -o ""' 13 | USE-REQUISITES 'project' 14 | cd 'project' 15 | CHECK-COMMAND amalgamate -o '..' 16 | CHECK-CONTENTS \ 17 | OF-FILE '../project-amalgamated/project.hpp' \ 18 | WITH-FILE 'expected/project-amalgamated.hpp' 19 | 20 | TEST-CASE 'amalgamate -o ""' 21 | USE-REQUISITES 'project' 22 | mkdir -p 'one' 23 | cd 'project' 24 | CHECK-COMMAND amalgamate -o '../one' 25 | CHECK-CONTENTS \ 26 | OF-FILE '../one/project-amalgamated/project.hpp' \ 27 | WITH-FILE 'expected/project-amalgamated.hpp' 28 | 29 | -------------------------------------------------------------------------------- /tests/tests/output-extensions-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 'simple-projects' 2 | 3 | SECTION '-x "h,c"' 4 | 5 | TEST-CASE 'amalgamate -x "h,c" with header-only project' 6 | USE-REQUISITES 'header-only' 7 | cd 'header-only' 8 | CHECK-COMMAND amalgamate -x 'h,c' -M 9 | CHECK [ -r 'header-only-amalgamated/header-only.h' ] 10 | 11 | TEST-CASE 'amalgamate -x "h,c" with source-only project' 12 | USE-REQUISITES 'source-only' 13 | cd 'source-only' 14 | CHECK-COMMAND amalgamate -x 'h,c' -M 15 | CHECK [ -r 'source-only-amalgamated/source-only.h' ] 16 | 17 | TEST-CASE 'amalgamate -x "h,c" with header and source project' 18 | USE-REQUISITES 'header-and-source' 19 | cd 'header-and-source' 20 | CHECK-COMMAND amalgamate -x 'h,c' -M 21 | CHECK [ -r 'header-and-source-amalgamated/header-and-source.h' ] 22 | CHECK [ -r 'header-and-source-amalgamated/header-and-source.c' ] 23 | 24 | 25 | SECTION '-x "hxx,cxx"' 26 | 27 | TEST-CASE 'amalgamate -x "hxx,cxx" with header-only project' 28 | USE-REQUISITES 'header-only' 29 | cd 'header-only' 30 | CHECK-COMMAND amalgamate -x 'hxx,cxx' -M 31 | CHECK [ -r 'header-only-amalgamated/header-only.hxx' ] 32 | 33 | TEST-CASE 'amalgamate -x "hxx,cxx" with source-only project' 34 | USE-REQUISITES 'source-only' 35 | cd 'source-only' 36 | CHECK-COMMAND amalgamate -x 'hxx,cxx' -M 37 | CHECK [ -r 'source-only-amalgamated/source-only.hxx' ] 38 | 39 | TEST-CASE 'amalgamate -x "hxx,cxx" with header and source project' 40 | USE-REQUISITES 'header-and-source' 41 | cd 'header-and-source' 42 | CHECK-COMMAND amalgamate -x 'hxx,cxx' -M 43 | CHECK [ -r 'header-and-source-amalgamated/header-and-source.hxx' ] 44 | CHECK [ -r 'header-and-source-amalgamated/header-and-source.cxx' ] 45 | 46 | -------------------------------------------------------------------------------- /tests/tests/output-name-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate # no "-n", using default name' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | amalgamate 7 | CHECK [ -r 'project-amalgamated/project.hpp' ] 8 | 9 | TEST-CASE 'amalgamate -n another' 10 | USE-REQUISITES 'project' 11 | cd 'project' 12 | amalgamate -n 'another' 13 | CHECK [ -r 'another-amalgamated/another.hpp' ] 14 | 15 | TEST-CASE 'amalgamate -n another -S' 16 | USE-REQUISITES 'project' 17 | cd 'project' 18 | amalgamate -n 'another' -S 19 | CHECK [ -r 'another-amalgamated/another.cpp' ] 20 | 21 | TEST-CASE 'amalgamate -n another -M' 22 | USE-REQUISITES 'project' 23 | cd 'project' 24 | amalgamate -n 'another' -M 25 | CHECK [ -r 'another-amalgamated/another.hpp' ] 26 | CHECK [ -r 'another-amalgamated/another.cpp' ] 27 | 28 | TEST-CASE 'amalgamate -n something-else' 29 | USE-REQUISITES 'project' 30 | cd 'project' 31 | amalgamate -n 'something-else' 32 | CHECK [ -r 'something-else-amalgamated/something-else.hpp' ] 33 | 34 | TEST-CASE 'amalgamate -n something-else -S' 35 | USE-REQUISITES 'project' 36 | cd 'project' 37 | amalgamate -n 'something-else' -S 38 | CHECK [ -r 'something-else-amalgamated/something-else.cpp' ] 39 | 40 | TEST-CASE 'amalgamate -n something-else -M' 41 | USE-REQUISITES 'project' 42 | cd 'project' 43 | amalgamate -n 'something-else' -M 44 | CHECK [ -r 'something-else-amalgamated/something-else.hpp' ] 45 | CHECK [ -r 'something-else-amalgamated/something-else.cpp' ] 46 | 47 | -------------------------------------------------------------------------------- /tests/tests/path-extension.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'path-extension() with "path.extension"' 4 | result=$(path-extension 'path.extension') 5 | CHECK [ "$result" == 'extension' ] 6 | 7 | result=$(path-extension 'deeper/path.extension') 8 | CHECK [ "$result" == 'extension' ] 9 | 10 | result=$(path-extension 'more/deeper/path.extension') 11 | CHECK [ "$result" == 'extension' ] 12 | 13 | result=$(path-extension 'path.hpp') 14 | CHECK [ "$result" == 'hpp' ] 15 | 16 | result=$(path-extension 'deeper/path.hpp') 17 | CHECK [ "$result" == 'hpp' ] 18 | 19 | result=$(path-extension 'more/deeper/path.hpp') 20 | CHECK [ "$result" == 'hpp' ] 21 | 22 | TEST-CASE 'path-extension() without extension' 23 | result=$(path-extension 'path.') 24 | CHECK [ "$result" == '' ] 25 | 26 | result=$(path-extension 'deeper/path.') 27 | CHECK [ "$result" == '' ] 28 | 29 | result=$(path-extension 'more/deeper/path.') 30 | CHECK [ "$result" == '' ] 31 | 32 | result=$(path-extension 'path') 33 | CHECK [ "$result" == '' ] 34 | 35 | result=$(path-extension 'deeper/path') 36 | CHECK [ "$result" == '' ] 37 | 38 | result=$(path-extension 'more/deeper/path') 39 | CHECK [ "$result" == '' ] 40 | 41 | result=$(path-extension '.hidden') 42 | CHECK [ "$result" == '' ] 43 | 44 | -------------------------------------------------------------------------------- /tests/tests/path-from-include-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'path-from-include-line() with valid include line' 4 | result=$(path-from-include-line '#include "header"') 5 | CHECK [ "$result" == 'header' ] 6 | 7 | result=$(path-from-include-line '#include "header.hpp"') 8 | CHECK [ "$result" == 'header.hpp' ] 9 | 10 | result=$(path-from-include-line ' #include "header.hpp"') 11 | CHECK [ "$result" == 'header.hpp' ] 12 | 13 | result=$(path-from-include-line '# include "header.hpp"') 14 | CHECK [ "$result" == 'header.hpp' ] 15 | 16 | result=$(path-from-include-line '#include "header.hpp" ') 17 | CHECK [ "$result" == 'header.hpp' ] 18 | 19 | result=$(path-from-include-line '#include "header.hpp" // not relevant') 20 | CHECK [ "$result" == 'header.hpp' ] 21 | 22 | -------------------------------------------------------------------------------- /tests/tests/path-from-standard-include-line.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'path-from-standard-include-line() with valid include line' 4 | result=$(path-from-standard-include-line '#include
') 5 | CHECK [ "$result" == 'header' ] 6 | 7 | result=$(path-from-standard-include-line '#include ') 8 | CHECK [ "$result" == 'header.hpp' ] 9 | 10 | result=$(path-from-standard-include-line ' #include ') 11 | CHECK [ "$result" == 'header.hpp' ] 12 | 13 | result=$(path-from-standard-include-line '# include ') 14 | CHECK [ "$result" == 'header.hpp' ] 15 | 16 | result=$(path-from-standard-include-line '#include ') 17 | CHECK [ "$result" == 'header.hpp' ] 18 | 19 | result=$(path-from-standard-include-line '#include // not relevant') 20 | CHECK [ "$result" == 'header.hpp' ] 21 | 22 | -------------------------------------------------------------------------------- /tests/tests/reduce-blank-lines-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -b 0' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -b 0 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated-b-0.hpp' 10 | 11 | TEST-CASE 'amalgamate -b 1' 12 | USE-REQUISITES 'project' 13 | cd 'project' 14 | CHECK-COMMAND amalgamate -b 1 15 | CHECK-CONTENTS \ 16 | OF-FILE 'project-amalgamated/project.hpp' \ 17 | WITH-FILE 'expected/project-amalgamated-b-1.hpp' 18 | 19 | TEST-CASE 'amalgamate -b 2' 20 | USE-REQUISITES 'project' 21 | cd 'project' 22 | CHECK-COMMAND amalgamate -b 2 23 | CHECK-CONTENTS \ 24 | OF-FILE 'project-amalgamated/project.hpp' \ 25 | WITH-FILE 'expected/project-amalgamated-b-2.hpp' 26 | 27 | -------------------------------------------------------------------------------- /tests/tests/reduce-blank-lines.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | USE-SANDBOX 4 | 5 | SECTION 'Empty file' 6 | 7 | TEST-CASE 'reduce-blank-lines() with empty file' 8 | USE-REQUISITES 'empty.hpp' 9 | reduce-blank-lines 'empty.hpp' 0 10 | CHECK-CONTENTS \ 11 | OF-FILE 'empty.hpp' \ 12 | WITH-FILE 'expected/empty.hpp' 13 | 14 | reduce-blank-lines 'empty.hpp' 1 15 | CHECK-CONTENTS \ 16 | OF-FILE 'empty.hpp' \ 17 | WITH-FILE 'expected/empty.hpp' 18 | 19 | reduce-blank-lines 'empty.hpp' 2 20 | CHECK-CONTENTS \ 21 | OF-FILE 'empty.hpp' \ 22 | WITH-FILE 'expected/empty.hpp' 23 | 24 | 25 | SECTION 'Single blank lines' 26 | 27 | TEST-CASE 'reduce-blank-lines() with single blank lines reduced to 0' 28 | USE-REQUISITES 'single-blank-lines.hpp' 29 | reduce-blank-lines 'single-blank-lines.hpp' 0 30 | CHECK-CONTENTS \ 31 | OF-FILE 'single-blank-lines.hpp' \ 32 | WITH-FILE 'expected/single-blank-lines-reduced-to-0.hpp' 33 | 34 | TEST-CASE 'reduce-blank-lines() with single blank lines reduced to 1' 35 | USE-REQUISITES 'single-blank-lines.hpp' 36 | reduce-blank-lines 'single-blank-lines.hpp' 1 37 | CHECK-CONTENTS \ 38 | OF-FILE 'single-blank-lines.hpp' \ 39 | WITH-FILE 'expected/single-blank-lines-reduced-to-1.hpp' 40 | 41 | TEST-CASE 'reduce-blank-lines() with single blank lines reduced to 2' 42 | USE-REQUISITES 'single-blank-lines.hpp' 43 | reduce-blank-lines 'single-blank-lines.hpp' 2 44 | CHECK-CONTENTS \ 45 | OF-FILE 'single-blank-lines.hpp' \ 46 | WITH-FILE 'expected/single-blank-lines-reduced-to-2.hpp' 47 | 48 | 49 | SECTION 'Double blank lines' 50 | 51 | TEST-CASE 'reduce-blank-lines() with double blank lines reduced to 0' 52 | USE-REQUISITES 'double-blank-lines.hpp' 53 | reduce-blank-lines 'double-blank-lines.hpp' 0 54 | CHECK-CONTENTS \ 55 | OF-FILE 'double-blank-lines.hpp' \ 56 | WITH-FILE 'expected/double-blank-lines-reduced-to-0.hpp' 57 | 58 | TEST-CASE 'reduce-blank-lines() with double blank lines reduced to 1' 59 | USE-REQUISITES 'double-blank-lines.hpp' 60 | reduce-blank-lines 'double-blank-lines.hpp' 1 61 | CHECK-CONTENTS \ 62 | OF-FILE 'double-blank-lines.hpp' \ 63 | WITH-FILE 'expected/double-blank-lines-reduced-to-1.hpp' 64 | 65 | TEST-CASE 'reduce-blank-lines() with double blank lines reduced to 2' 66 | USE-REQUISITES 'double-blank-lines.hpp' 67 | reduce-blank-lines 'double-blank-lines.hpp' 2 68 | CHECK-CONTENTS \ 69 | OF-FILE 'double-blank-lines.hpp' \ 70 | WITH-FILE 'expected/double-blank-lines-reduced-to-2.hpp' 71 | 72 | 73 | SECTION 'Triple blank lines' 74 | 75 | TEST-CASE 'reduce-blank-lines() with triple blank lines reduced to 0' 76 | USE-REQUISITES 'triple-blank-lines.hpp' 77 | reduce-blank-lines 'triple-blank-lines.hpp' 0 78 | CHECK-CONTENTS \ 79 | OF-FILE 'triple-blank-lines.hpp' \ 80 | WITH-FILE 'expected/triple-blank-lines-reduced-to-0.hpp' 81 | 82 | TEST-CASE 'reduce-blank-lines() with triple blank lines reduced to 1' 83 | USE-REQUISITES 'triple-blank-lines.hpp' 84 | reduce-blank-lines 'triple-blank-lines.hpp' 1 85 | CHECK-CONTENTS \ 86 | OF-FILE 'triple-blank-lines.hpp' \ 87 | WITH-FILE 'expected/triple-blank-lines-reduced-to-1.hpp' 88 | 89 | TEST-CASE 'reduce-blank-lines() with triple blank lines reduced to 2' 90 | USE-REQUISITES 'triple-blank-lines.hpp' 91 | reduce-blank-lines 'triple-blank-lines.hpp' 2 92 | CHECK-CONTENTS \ 93 | OF-FILE 'triple-blank-lines.hpp' \ 94 | WITH-FILE 'expected/triple-blank-lines-reduced-to-2.hpp' 95 | 96 | 97 | SECTION 'Mixed' 98 | 99 | TEST-CASE 'reduce-blank-lines() with mixed amount of blank lines reduced to 0' 100 | USE-REQUISITES 'mixed-blank-lines.hpp' 101 | reduce-blank-lines 'mixed-blank-lines.hpp' 0 102 | CHECK-CONTENTS \ 103 | OF-FILE 'mixed-blank-lines.hpp' \ 104 | WITH-FILE 'expected/mixed-blank-lines-reduced-to-0.hpp' 105 | 106 | TEST-CASE 'reduce-blank-lines() with mixed amount of blank lines reduced to 1' 107 | USE-REQUISITES 'mixed-blank-lines.hpp' 108 | reduce-blank-lines 'mixed-blank-lines.hpp' 1 109 | CHECK-CONTENTS \ 110 | OF-FILE 'mixed-blank-lines.hpp' \ 111 | WITH-FILE 'expected/mixed-blank-lines-reduced-to-1.hpp' 112 | 113 | TEST-CASE 'reduce-blank-lines() with mixed amount of blank lines reduced to 2' 114 | USE-REQUISITES 'mixed-blank-lines.hpp' 115 | reduce-blank-lines 'mixed-blank-lines.hpp' 2 116 | CHECK-CONTENTS \ 117 | OF-FILE 'mixed-blank-lines.hpp' \ 118 | WITH-FILE 'expected/mixed-blank-lines-reduced-to-2.hpp' 119 | 120 | -------------------------------------------------------------------------------- /tests/tests/relative-path.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'relative-path() with path inside base path' 4 | result=$(relative-path '/one' '/') 5 | CHECK [ "$result" == './one' ] 6 | 7 | result=$(relative-path '/one/two' '/one') 8 | CHECK [ "$result" == './two' ] 9 | 10 | result=$(relative-path '/one/two/three' '/one') 11 | CHECK [ "$result" == './two/three' ] 12 | 13 | result=$(relative-path '/one/two/three' '/one/two') 14 | CHECK [ "$result" == './three' ] 15 | 16 | result=$(relative-path '/one/two/three/four' '/one/two') 17 | CHECK [ "$result" == './three/four' ] 18 | 19 | TEST-CASE 'relative-path() with path outside base path' 20 | result=$(relative-path '/one/two/three/four' '/first/second') 21 | CHECK [ "$result" == '/one/two/three/four' ] 22 | 23 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/file-printf/requisites/expected/appended-file.txt: -------------------------------------------------------------------------------- 1 | wazuuup! 2 | hellomoto! 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/file-printf/requisites/expected/format-d.txt: -------------------------------------------------------------------------------- 1 | 456 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/file-printf/requisites/expected/format-s.txt: -------------------------------------------------------------------------------- 1 | hellomoto! 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/file-printf/requisites/expected/new-file.txt: -------------------------------------------------------------------------------- 1 | hellomoto! 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/file-printf/requisites/file.txt: -------------------------------------------------------------------------------- 1 | wazuuup! 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/requisites/expected/one-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | one 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/requisites/expected/one-two-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | one 4 | two 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/requisites/expected/one-two-three-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | one 4 | two 5 | three 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/requisites/project/one.hpp: -------------------------------------------------------------------------------- 1 | one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/requisites/project/three.hpp: -------------------------------------------------------------------------------- 1 | three 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/files-to-amalgamate-arguments/requisites/project/two.hpp: -------------------------------------------------------------------------------- 1 | two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/LICENSE.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/README.md -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-one/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-one/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-one/component-one.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-one/component-one.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-one/component-one.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-one/component-one.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-three/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-three/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-three/component-three.c++: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-three/component-three.c++ -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-three/component-three.h++: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-three/component-three.h++ -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-two/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-two/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-two/component-two.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-two/component-two.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-two/component-two.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/component-two/component-two.h -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/main.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/main.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/main.h -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-one.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-one.c -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-one.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-one.h -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-two.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-two.cxx -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-two.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep-and-messy/src/utils/util-two.hxx -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/LICENSE.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/README.md -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-one/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-one/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-one/component-one.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-one/component-one.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-one/component-one.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-one/component-one.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-three/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-three/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-three/component-three.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-three/component-three.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-three/component-three.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-three/component-three.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-two/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-two/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-two/component-two.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-two/component-two.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-two/component-two.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/component-two/component-two.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/main.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/main.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/main.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-one.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-one.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-one.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-one.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-two.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-two.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-two.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/deep/src/utils/util-two.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/empty/placeholer-to-preserve-directory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/empty/placeholer-to-preserve-directory -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/LICENSE.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/README.md -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/constants.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/constants.h -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/main.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/main.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/main.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/utils.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/utils.cxx -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/messy/utils.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/messy/utils.hxx -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/not-a-cpp/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/not-a-cpp/main.py -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/LICENSE.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/README.md -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/main.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/main.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/main.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/utils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/utils.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/simple/utils.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/simple/utils.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/std-only/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/std-only/CMakeLists.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/std-only/one.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/std-only/one.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/std-only/three.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/std-only/three.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/find-by-extensions/requisites/std-only/two.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/find-by-extensions/requisites/std-only/two.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/bigger-project/one.cpp: -------------------------------------------------------------------------------- 1 | // one.cpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/bigger-project/one.hpp: -------------------------------------------------------------------------------- 1 | // one.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/bigger-project/two.cpp: -------------------------------------------------------------------------------- 1 | // two.cpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/bigger-project/two.hpp: -------------------------------------------------------------------------------- 1 | // two.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-one.cpp/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // one.cpp 4 | // one.hpp 5 | // two.hpp 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-one.cpp/source.cpp: -------------------------------------------------------------------------------- 1 | #include "bigger-project.hpp" 2 | // two.cpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-one.hpp/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // one.hpp 4 | // two.hpp 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-one.hpp/source.cpp: -------------------------------------------------------------------------------- 1 | #include "bigger-project.hpp" 2 | // one.cpp 3 | // two.cpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-two.cpp/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // two.cpp 4 | // one.hpp 5 | // two.hpp 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-two.cpp/source.cpp: -------------------------------------------------------------------------------- 1 | #include "bigger-project.hpp" 2 | // one.cpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-two.hpp/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // two.hpp 4 | // one.hpp 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/bigger-project/pair-1-two.hpp/source.cpp: -------------------------------------------------------------------------------- 1 | #include "bigger-project.hpp" 2 | // one.cpp 3 | // two.cpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/pair-1-header.hpp/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/pair-1-header.hpp/source.cpp: -------------------------------------------------------------------------------- 1 | #include "small-project.hpp" 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/pair-1-source.cpp/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // source 4 | // header 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/pair-1-source.cpp/source.cpp: -------------------------------------------------------------------------------- 1 | #include "small-project.hpp" 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/single-header/1-header.hpp-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | // source 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/single-header/1-source.cpp-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // source 4 | // header 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/single-source/1-header.hpp-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/expected/small-project/single-source/1-source.cpp-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | // header 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/small-project/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/first-file-option/requisites/small-project/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/empty.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/gather-standard-include-paths/requisites/empty.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/multiple-both.hpp: -------------------------------------------------------------------------------- 1 | #include "four.hpp" 2 | #include "five.hpp" 3 | #include "six.hpp" 4 | 5 | #include 6 | #include 7 | #include 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/multiple-non-standard.hpp: -------------------------------------------------------------------------------- 1 | #include "one.hpp" 2 | #include "two.hpp" 3 | #include "three.hpp" 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/multiple-standard.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/nothing.hpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/single-non-standard.hpp: -------------------------------------------------------------------------------- 1 | #include "one.hpp" 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/gather-standard-include-paths/requisites/single-standard.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-and-interlude-options/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-and-interlude-options/requisites/expected/project-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // interlude 4 | #include 5 | #include 6 | // two.hpp 7 | // one.hpp 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-and-interlude-options/requisites/interlude.txt: -------------------------------------------------------------------------------- 1 | // interlude 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-and-interlude-options/requisites/project/one.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "two.hpp" 3 | // one.hpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-and-interlude-options/requisites/project/two.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | // two.hpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/expected/no-standard-headers.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // two.hpp 4 | // three.hpp 5 | // one.hpp 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/expected/repeated-headers.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | // two.hpp 6 | // three.hpp 7 | // one.hpp 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/expected/unique-headers.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | // two.hpp 6 | // one.hpp 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/no-standard-headers/one.hpp: -------------------------------------------------------------------------------- 1 | #include "two.hpp" 2 | #include "three.hpp" 3 | // one.hpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/no-standard-headers/three.hpp: -------------------------------------------------------------------------------- 1 | // three.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/no-standard-headers/two.hpp: -------------------------------------------------------------------------------- 1 | // two.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/repeated-headers/one.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "two.hpp" 3 | #include "three.hpp" 4 | // one.hpp 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/repeated-headers/three.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | // three.hpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/repeated-headers/two.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | // two.hpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/unique-headers/one.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "two.hpp" 3 | // one.hpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/group-standard-headers-option/requisites/unique-headers/two.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | // two.hpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/expected/project-amalgamated-into-header-with-prelude-two.hpp: -------------------------------------------------------------------------------- 1 | // prelude two 2 | #pragma once 3 | 4 | // header 5 | // source 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/expected/project-amalgamated-into-header.hpp: -------------------------------------------------------------------------------- 1 | // prelude one 2 | #pragma once 3 | 4 | // header 5 | // source 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/expected/project-amalgamated-into-pair.cpp: -------------------------------------------------------------------------------- 1 | #include "project.hpp" 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/expected/project-amalgamated-into-pair.hpp: -------------------------------------------------------------------------------- 1 | // prelude one 2 | #pragma once 3 | 4 | // header 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/expected/project-amalgamated-into-source.hpp: -------------------------------------------------------------------------------- 1 | // prelude one 2 | // header 3 | // source 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/prelude-one.txt: -------------------------------------------------------------------------------- 1 | // prelude one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/prelude-two.txt: -------------------------------------------------------------------------------- 1 | // prelude two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/header-prelude-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/expected/project-amalgamated-with-include-one.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // another one 4 | 5 | // header 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/expected/project-amalgamated-with-include-two.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // another two 4 | 5 | // header 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/expected/project-without-include-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/project-without-include/include-one/another.hpp: -------------------------------------------------------------------------------- 1 | // another one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/project-without-include/include-two/another.hpp: -------------------------------------------------------------------------------- 1 | // another two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/project-without-include/src/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/project/include-one/another.hpp: -------------------------------------------------------------------------------- 1 | // another one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/project/include-two/another.hpp: -------------------------------------------------------------------------------- 1 | // another two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-dir-option/requisites/project/src/header.hpp: -------------------------------------------------------------------------------- 1 | #include "another.hpp" 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project(name)-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_NAME__HPP_INCLUDED 2 | #define PROJECT_NAME__HPP_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_NAME__HPP_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-amalgamated-into-header.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_HPP_INCLUDED 2 | #define PROJECT_HPP_INCLUDED 3 | 4 | // header 5 | // source 6 | 7 | #endif // PROJECT_HPP_INCLUDED 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-amalgamated-into-pair.cpp: -------------------------------------------------------------------------------- 1 | #include "project.hpp" 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-amalgamated-into-pair.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_HPP_INCLUDED 2 | #define PROJECT_HPP_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_HPP_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-amalgamated-into-source.cpp: -------------------------------------------------------------------------------- 1 | // header 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-amalgamated-with-another-include-guard-id.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ANOTHER_INCLUDE_GUARD_ID 2 | #define ANOTHER_INCLUDE_GUARD_ID 3 | 4 | // header 5 | // source 6 | 7 | #endif // ANOTHER_INCLUDE_GUARD_ID 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-amalgamated-with-different-include-guard-id.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DIFFERENT_INCLUDE_GUARD_ID 2 | #define DIFFERENT_INCLUDE_GUARD_ID 3 | 4 | // header 5 | // source 6 | 7 | #endif // DIFFERENT_INCLUDE_GUARD_ID 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-h-amalgamated.h: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_H_H_INCLUDED 2 | #define PROJECT_H_H_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_H_H_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-hxx-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_HXX_HPP_INCLUDED 2 | #define PROJECT_HXX_HPP_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_HXX_HPP_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-hxx-amalgamated.hxx: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_HXX_HXX_INCLUDED 2 | #define PROJECT_HXX_HXX_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_HXX_HXX_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project-name-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_NAME_HPP_INCLUDED 2 | #define PROJECT_NAME_HPP_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_NAME_HPP_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project.name-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_NAME_HPP_INCLUDED 2 | #define PROJECT_NAME_HPP_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_NAME_HPP_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/expected/project_name-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_NAME_HPP_INCLUDED 2 | #define PROJECT_NAME_HPP_INCLUDED 3 | 4 | // header 5 | 6 | #endif // PROJECT_NAME_HPP_INCLUDED 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project(name)/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project-h/header.h: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project-hxx/header.hxx: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project-name/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project.name/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/include-guard-option/requisites/project_name/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-inlined-with-double-space-indent.hpp: -------------------------------------------------------------------------------- 1 | one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-inlined-with-quad-space-indent.hpp: -------------------------------------------------------------------------------- 1 | one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-inlined.hpp: -------------------------------------------------------------------------------- 1 | one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-two-inlined-with-double-space-indent.hpp: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-two-inlined.hpp: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-two-three-inlined-with-mixed-indent-variant-1.hpp: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | three 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-two-three-inlined-with-mixed-indent-variant-2.hpp: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | three 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-two-three-inlined-with-quad-space-indent.hpp: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | three 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/expected/one-two-three-inlined.hpp: -------------------------------------------------------------------------------- 1 | one 2 | two 3 | three 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/one.hpp: -------------------------------------------------------------------------------- 1 | one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/three.hpp: -------------------------------------------------------------------------------- 1 | three 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/inline-file/requisites/two.hpp: -------------------------------------------------------------------------------- 1 | two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/expected/first-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/expected/second-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/expected/third-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/first/header.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/input-directory-option/requisites/first/header.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/second/src/header.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/input-directory-option/requisites/second/src/header.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/second/tests/tests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/input-directory-option/requisites/second/tests/tests.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/third/sources/header.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/input-directory-option/requisites/third/sources/header.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-directory-option/requisites/third/tests/tests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/input-directory-option/requisites/third/tests/tests.cpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-h++-c++-amalgamated.c++: -------------------------------------------------------------------------------- 1 | #include "project.h++" 2 | // source.c++ 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-h++-c++-amalgamated.h++: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h++ 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-h-c-amalgamated.c: -------------------------------------------------------------------------------- 1 | #include "project.h" 2 | // source.c 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-h-c-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-hpp-cpp-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "project.hpp" 2 | // source.cpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-hpp-cpp-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.hpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-hxx-cxx-amalgamated.cxx: -------------------------------------------------------------------------------- 1 | #include "project.hxx" 2 | // source.cxx 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/expected/project-hxx-cxx-amalgamated.hxx: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.hxx 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/header.h: -------------------------------------------------------------------------------- 1 | // header.h 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/header.h++: -------------------------------------------------------------------------------- 1 | // header.h++ 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/header.hxx: -------------------------------------------------------------------------------- 1 | // header.hxx 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/source.c: -------------------------------------------------------------------------------- 1 | // source.c 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/source.c++: -------------------------------------------------------------------------------- 1 | // source.c++ 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source.cpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-and-source-extension-option/requisites/project/source.cxx: -------------------------------------------------------------------------------- 1 | // source.cxx 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h++-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header.h++ 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h++-amalgamated.h++: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h++ 4 | // source.c 5 | // source.c++ 6 | // source.cpp 7 | // source.cxx 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h++-and-all-sources-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "project.h++" 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h++-and-all-sources-amalgamated.h++: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h++ 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header.h 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // source.c 5 | // source.c++ 6 | // source.cpp 7 | // source.cxx 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h-and-all-sources-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "project.h" 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-h-and-all-sources-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hpp-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header.hpp 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hpp-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.hpp 4 | // source.c 5 | // source.c++ 6 | // source.cpp 7 | // source.cxx 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hpp-and-all-sources-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "project.hpp" 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hpp-and-all-sources-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.hpp 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hxx-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header.hxx 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hxx-amalgamated.hxx: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.hxx 4 | // source.c 5 | // source.c++ 6 | // source.cpp 7 | // source.cxx 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hxx-and-all-sources-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "project.hxx" 2 | // source.c 3 | // source.c++ 4 | // source.cpp 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/expected/project-hxx-and-all-sources-amalgamated.hxx: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.hxx 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/header.h: -------------------------------------------------------------------------------- 1 | // header.h 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/header.h++: -------------------------------------------------------------------------------- 1 | // header.h++ 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/header.hxx: -------------------------------------------------------------------------------- 1 | // header.hxx 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/source.c: -------------------------------------------------------------------------------- 1 | // source.c 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/source.c++: -------------------------------------------------------------------------------- 1 | // source.c++ 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source.cpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-header-extension-option/requisites/project/source.cxx: -------------------------------------------------------------------------------- 1 | // source.cxx 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-c++-amalgamated.c++: -------------------------------------------------------------------------------- 1 | #include "project.h" 2 | // source.c++ 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-c++-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-c-amalgamated.c: -------------------------------------------------------------------------------- 1 | #include "project.h" 2 | // source.c 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-c-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-cpp-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "project.h" 2 | // source.cpp 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-cpp-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-cxx-amalgamated.cxx: -------------------------------------------------------------------------------- 1 | #include "project.h" 2 | // source.cxx 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-all-headers-and-cxx-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-c++-amalgamated.c++: -------------------------------------------------------------------------------- 1 | // header.h 2 | // header.h++ 3 | // header.hpp 4 | // header.hxx 5 | // source.c++ 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-c++-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | // source.c++ 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-c-amalgamated.c: -------------------------------------------------------------------------------- 1 | // header.h 2 | // header.h++ 3 | // header.hpp 4 | // header.hxx 5 | // source.c 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-c-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | // source.c 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-cpp-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header.h 2 | // header.h++ 3 | // header.hpp 4 | // header.hxx 5 | // source.cpp 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-cpp-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | // source.cpp 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-cxx-amalgamated.cxx: -------------------------------------------------------------------------------- 1 | // header.h 2 | // header.h++ 3 | // header.hpp 4 | // header.hxx 5 | // source.cxx 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/expected/project-cxx-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header.h 4 | // header.h++ 5 | // header.hpp 6 | // header.hxx 7 | // source.cxx 8 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/header.h: -------------------------------------------------------------------------------- 1 | // header.h 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/header.h++: -------------------------------------------------------------------------------- 1 | // header.h++ 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header.hpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/header.hxx: -------------------------------------------------------------------------------- 1 | // header.hxx 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/source.c: -------------------------------------------------------------------------------- 1 | // source.c 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/source.c++: -------------------------------------------------------------------------------- 1 | // source.c++ 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source.cpp 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/input-source-extension-option/requisites/project/source.cxx: -------------------------------------------------------------------------------- 1 | // source.cxx 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/insert-annotations-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/insert-annotations-option/requisites/expected/project-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // ============================================================================ 4 | // == ./implementation.hpp == 5 | // == 6 | // #pragma once 7 | // ============================================================================ 8 | // == ./utility.hpp == 9 | // == 10 | // #pragma once 11 | void utility() 12 | { 13 | } 14 | // == 15 | // == ./utility.hpp == 16 | // ============================================================================ 17 | 18 | 19 | void func() 20 | { 21 | utility() 22 | } 23 | // == 24 | // == ./implementation.hpp == 25 | // ============================================================================ 26 | 27 | // ============================================================================ 28 | // == ./interface.hpp == 29 | // == 30 | // #pragma once 31 | // #include "implementation.hpp" // amalgamate: file already inlined 32 | // #include "utility.hpp" // amalgamate: file already inlined 33 | 34 | void inteface() 35 | { 36 | implementation() 37 | utility() 38 | } 39 | // == 40 | // == ./interface.hpp == 41 | // ============================================================================ 42 | 43 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/insert-annotations-option/requisites/project/implementation.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "utility.hpp" 4 | 5 | void func() 6 | { 7 | utility() 8 | } 9 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/insert-annotations-option/requisites/project/interface.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "implementation.hpp" 4 | #include "utility.hpp" 5 | 6 | void inteface() 7 | { 8 | implementation() 9 | utility() 10 | } 11 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/insert-annotations-option/requisites/project/utility.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void utility() 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/expected/project-amalgamated-into-header-interlude-one.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // interlude one 4 | // header 5 | // source 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/expected/project-amalgamated-into-header-interlude-two.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // interlude two 4 | // header 5 | // source 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/expected/project-amalgamated-into-pair-interlude-one.cpp: -------------------------------------------------------------------------------- 1 | #include "project.hpp" 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/expected/project-amalgamated-into-pair-interlude-one.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // interlude one 4 | // header 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/expected/project-amalgamated-into-source-interlude-one.cpp: -------------------------------------------------------------------------------- 1 | // header 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/interlude-one.txt: -------------------------------------------------------------------------------- 1 | // interlude one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/interlude-two.txt: -------------------------------------------------------------------------------- 1 | // interlude two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/interlude-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/expected/header-and-source-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "header-and-source.hpp" 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/expected/header-and-source-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/expected/header-only-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "header-only.hpp" 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/expected/header-only-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/expected/source-only-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | #include "source-only.h" 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/expected/source-only-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/header-and-source/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/header-and-source/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/header-only/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-header-source-pair-option/requisites/source-only/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/expected/header-and-source-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | // source 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/expected/header-only-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/expected/source-only-amalgamated.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // source 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/header-and-source/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/header-and-source/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/header-only/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-header-option/requisites/source-only/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/expected/header-and-source-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header 2 | // source 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/expected/header-only-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/expected/source-only-amalgamated.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/header-and-source/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/header-and-source/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/header-only/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/into-single-source-option/requisites/source-only/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/output-directory-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/output-directory-option/requisites/expected/project-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/output-directory-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/output-directory-option/requisites/project/header.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/output-name-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/output-name-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/output-name-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one/four.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one/four.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one/four/nine.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one/four/nine.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one/four/ten.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one/four/ten.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one/three.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one/three.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one/three/eight.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one/three/eight.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/one/three/seven.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/one/three/seven.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two/five.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two/five.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two/five/eleven.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two/five/eleven.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two/five/twelve.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two/five/twelve.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two/six.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two/six.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two/six/fourteen.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two/six/fourteen.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/path-expansion/requisites/two/six/thirteen.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/path-expansion/requisites/two/six/thirteen.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines-option/requisites/expected/project-amalgamated-b-0.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | void func(); 3 | void func() 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines-option/requisites/expected/project-amalgamated-b-1.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void func(); 4 | 5 | void func() 6 | { 7 | 8 | } 9 | 10 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines-option/requisites/expected/project-amalgamated-b-2.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | void func(); 5 | 6 | 7 | void func() 8 | { 9 | 10 | 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | void func(); 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | #include "header.hpp" 2 | 3 | 4 | void func() 5 | { 6 | 7 | 8 | } 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/double-blank-lines.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | namespace trimmed 5 | { 6 | 7 | 8 | void something(); 9 | 10 | 11 | } 12 | 13 | 14 | namespace trimmed 15 | { 16 | 17 | 18 | void something() 19 | { 20 | std::cout << "something happened" << std::endl; 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/empty.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/reduce-blank-lines/requisites/empty.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/double-blank-lines-reduced-to-0.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace trimmed 3 | { 4 | void something(); 5 | } 6 | namespace trimmed 7 | { 8 | void something() 9 | { 10 | std::cout << "something happened" << std::endl; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/double-blank-lines-reduced-to-1.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | namespace trimmed 11 | { 12 | 13 | void something() 14 | { 15 | std::cout << "something happened" << std::endl; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/double-blank-lines-reduced-to-2.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | namespace trimmed 5 | { 6 | 7 | 8 | void something(); 9 | 10 | 11 | } 12 | 13 | 14 | namespace trimmed 15 | { 16 | 17 | 18 | void something() 19 | { 20 | std::cout << "something happened" << std::endl; 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/empty.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/reduce-blank-lines/requisites/expected/empty.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/mixed-blank-lines-reduced-to-0.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace trimmed 3 | { 4 | void something(); 5 | } 6 | namespace trimmed 7 | { 8 | void something() 9 | { 10 | std::cout << "something happened" << std::endl; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/mixed-blank-lines-reduced-to-1.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | namespace trimmed 11 | { 12 | 13 | void something() 14 | { 15 | std::cout << "something happened" << std::endl; 16 | } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/mixed-blank-lines-reduced-to-2.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | namespace trimmed 5 | { 6 | 7 | void something(); 8 | 9 | } 10 | 11 | 12 | namespace trimmed 13 | { 14 | 15 | void something() 16 | { 17 | std::cout << "something happened" << std::endl; 18 | } 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/single-blank-lines-reduced-to-0.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace trimmed 3 | { 4 | void something(); 5 | } 6 | namespace trimmed 7 | { 8 | void something() 9 | { 10 | std::cout << "something happened" << std::endl; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/single-blank-lines-reduced-to-1.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | namespace trimmed 11 | { 12 | 13 | void something() 14 | { 15 | std::cout << "something happened" << std::endl; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/single-blank-lines-reduced-to-2.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | namespace trimmed 11 | { 12 | 13 | void something() 14 | { 15 | std::cout << "something happened" << std::endl; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/triple-blank-lines-reduced-to-0.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace trimmed 3 | { 4 | void something(); 5 | } 6 | namespace trimmed 7 | { 8 | void something() 9 | { 10 | std::cout << "something happened" << std::endl; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/triple-blank-lines-reduced-to-1.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | namespace trimmed 11 | { 12 | 13 | void something() 14 | { 15 | std::cout << "something happened" << std::endl; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/expected/triple-blank-lines-reduced-to-2.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | namespace trimmed 5 | { 6 | 7 | 8 | void something(); 9 | 10 | 11 | } 12 | 13 | 14 | namespace trimmed 15 | { 16 | 17 | 18 | void something() 19 | { 20 | std::cout << "something happened" << std::endl; 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/mixed-blank-lines.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | namespace trimmed 5 | { 6 | 7 | void something(); 8 | 9 | } 10 | 11 | 12 | namespace trimmed 13 | { 14 | 15 | void something() 16 | { 17 | std::cout << "something happened" << std::endl; 18 | } 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/single-blank-lines.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | namespace trimmed 11 | { 12 | 13 | void something() 14 | { 15 | std::cout << "something happened" << std::endl; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/reduce-blank-lines/requisites/triple-blank-lines.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | 5 | namespace trimmed 6 | { 7 | 8 | 9 | 10 | void something(); 11 | 12 | 13 | 14 | } 15 | 16 | 17 | 18 | namespace trimmed 19 | { 20 | 21 | 22 | 23 | void something() 24 | { 25 | std::cout << "something happened" << std::endl; 26 | } 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/simple-projects/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/simple-projects/requisites/header-and-source/header.hpp: -------------------------------------------------------------------------------- 1 | header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/simple-projects/requisites/header-and-source/source.cpp: -------------------------------------------------------------------------------- 1 | source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/simple-projects/requisites/header-only/header.hpp: -------------------------------------------------------------------------------- 1 | header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/simple-projects/requisites/source-only/source.cpp: -------------------------------------------------------------------------------- 1 | source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/expected/project-amalgamated-into-header-with-prelude-two.hpp: -------------------------------------------------------------------------------- 1 | // prelude two 2 | #pragma once 3 | 4 | // header 5 | // source 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/expected/project-amalgamated-into-header.hpp: -------------------------------------------------------------------------------- 1 | // prelude one 2 | #pragma once 3 | 4 | // header 5 | // source 6 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/expected/project-amalgamated-into-pair.cpp: -------------------------------------------------------------------------------- 1 | // prelude one 2 | #include "project.hpp" 3 | // source 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/expected/project-amalgamated-into-pair.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // header 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/expected/project-amalgamated-into-source.hpp: -------------------------------------------------------------------------------- 1 | // prelude one 2 | // header 3 | // source 4 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/prelude-one.txt: -------------------------------------------------------------------------------- 1 | // prelude one 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/prelude-two.txt: -------------------------------------------------------------------------------- 1 | // prelude two 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | // header 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/source-prelude-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | // source 2 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace-option/requisites/expected/project-amalgamated.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | void func(); 5 | 6 | 7 | void func() 8 | { 9 | } 10 | 11 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace-option/requisites/project/header.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void func(); 4 | 5 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace-option/requisites/project/source.cpp: -------------------------------------------------------------------------------- 1 | #include "header.hpp" 2 | 3 | void func() 4 | { 5 | } 6 | 7 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace/requisites/empty.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/trim-trailing-whitespace/requisites/empty.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace/requisites/expected/empty.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/trim-trailing-whitespace/requisites/expected/empty.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace/requisites/expected/non-trimmed.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | 11 | namespace trimmed 12 | { 13 | 14 | void something() 15 | { 16 | std::cout << "something happened" << std::endl; 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace/requisites/expected/trimmed.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | 11 | namespace trimmed 12 | { 13 | 14 | void something() 15 | { 16 | std::cout << "something happened" << std::endl; 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace/requisites/non-trimmed.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | 11 | namespace trimmed 12 | { 13 | 14 | void something() 15 | { 16 | std::cout << "something happened" << std::endl; 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/trim-trailing-whitespace/requisites/trimmed.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace trimmed 4 | { 5 | 6 | void something(); 7 | 8 | } 9 | 10 | 11 | namespace trimmed 12 | { 13 | 14 | void something() 15 | { 16 | std::cout << "something happened" << std::endl; 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/environment/amalgamate: -------------------------------------------------------------------------------- 1 | ../../../../../amalgamate -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/file-list-1: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | 23 | Done. 24 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/file-list-2: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: h 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/source.cpp 22 | 23 | Done. 24 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/file-list-3: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/first-file-header-hpp: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | Top of queue: $PWD/src/project/header.hpp 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Header only. Extension: hpp 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/first-file-source-cpp: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | Top of queue: $PWD/src/project/source.cpp 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Header only. Extension: hpp 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/source.cpp 23 | ./src/project/header.hpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/group-headers-on-top: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: yes 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Grouping standard headers on top... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-extensions-h-hh: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: h 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/source.cpp 22 | 23 | Done. 24 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-extensions-hpp-h++: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: hpp h++ 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-interlude-1-txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: $SANDBOX_ROOT/interlude-1.txt 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Adding header interlude... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-interlude-2-txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: $SANDBOX_ROOT/interlude-2.txt 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Adding header interlude... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-prelude-1-txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: $SANDBOX_ROOT/prelude-1.txt 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding prelude... 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-prelude-1-txt-pair: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: $SANDBOX_ROOT/prelude-1.txt 7 | Header interlude file: no 8 | Source prelude file: no 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Extensions: hpp, cpp 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding header prelude... 21 | Adding include guard... 22 | Amalgamating files... 23 | ./src/project/header.hpp 24 | ./src/project/source.cpp 25 | 26 | Done. 27 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-prelude-1-txt-source-only: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Source prelude file: $SANDBOX_ROOT/prelude-1.txt 7 | 8 | [Output] 9 | Destination: $PWD/project-amalgamated 10 | Base name: project 11 | Source only. Extension: cpp 12 | Group uninlined headers on top: no 13 | Reduce consecutive blank lines to: no 14 | Trim trailing whitespace: no 15 | Insert annotations: no 16 | 17 | Adding prelude... 18 | Amalgamating files... 19 | ./src/project/header.hpp 20 | ./src/project/source.cpp 21 | 22 | Done. 23 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/header-prelude-2-txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: $SANDBOX_ROOT/prelude-2.txt 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding prelude... 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/include-guard-automatic: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #ifndef PROJECT_HPP_INCLUDED 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/include-guard-custom-1: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #ifndef PROJECT_HPP_ALREADY_INCLUDED 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/include-guard-custom-2: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #ifndef PROJECT_HPP_INCLUDE_GUARD 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/include-src: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD/src 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/include-src-project: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD/src/project 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/input-src: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD/src 3 | Header search path: $PWD/src 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/input-src-project: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD/src/project 3 | Header search path: $PWD/src/project 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/just-verbose: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/name-shmoject: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/shmoject-amalgamated 11 | Base name: shmoject 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/name-shmouject: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/shmouject-amalgamated 11 | Base name: shmouject 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/output-dir-up: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/output-extensions-h++-c++: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | Source prelude file: no 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Extensions: h++, c++ 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/output-extensions-hh-cc: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | Source prelude file: no 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Extensions: hh, cc 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/output-header-only: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/header-only/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Done. 25 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/pair: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | Source prelude file: no 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Extensions: hpp, cpp 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/reduce-blank-lines-0: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: 0 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Reducing blank lines... 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/reduce-blank-lines-1: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: 1 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Reducing blank lines... 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/reduce-blank-lines-2: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: 2 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Reducing blank lines... 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-extensions-c-cc: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc 6 | Source prelude file: no 7 | 8 | [Output] 9 | Destination: $PWD/project-amalgamated 10 | Base name: project 11 | Source only. Extension: cpp 12 | Group uninlined headers on top: no 13 | Reduce consecutive blank lines to: no 14 | Trim trailing whitespace: no 15 | Insert annotations: no 16 | 17 | Amalgamating files... 18 | ./src/project/header.hpp 19 | 20 | Done. 21 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-extensions-cpp-c++: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: cpp c++ 6 | Source prelude file: no 7 | 8 | [Output] 9 | Destination: $PWD/project-amalgamated 10 | Base name: project 11 | Source only. Extension: cpp 12 | Group uninlined headers on top: no 13 | Reduce consecutive blank lines to: no 14 | Trim trailing whitespace: no 15 | Insert annotations: no 16 | 17 | Amalgamating files... 18 | ./src/project/header.hpp 19 | ./src/project/source.cpp 20 | 21 | Done. 22 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-only: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Source prelude file: no 7 | 8 | [Output] 9 | Destination: $PWD/project-amalgamated 10 | Base name: project 11 | Source only. Extension: cpp 12 | Group uninlined headers on top: no 13 | Reduce consecutive blank lines to: no 14 | Trim trailing whitespace: no 15 | Insert annotations: no 16 | 17 | Amalgamating files... 18 | ./src/project/header.hpp 19 | ./src/project/source.cpp 20 | 21 | Done. 22 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-prelude-1-txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: $SANDBOX_ROOT/prelude-1.txt 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding prelude... 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-prelude-1-txt-pair: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | Source prelude file: $SANDBOX_ROOT/prelude-1.txt 9 | 10 | [Output] 11 | Destination: $PWD/project-amalgamated 12 | Base name: project 13 | Extensions: hpp, cpp 14 | Include guard: #pragma once 15 | Group uninlined headers on top: no 16 | Reduce consecutive blank lines to: no 17 | Trim trailing whitespace: no 18 | Insert annotations: no 19 | 20 | Adding source prelude... 21 | Adding include guard... 22 | Amalgamating files... 23 | ./src/project/header.hpp 24 | ./src/project/source.cpp 25 | 26 | Done. 27 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-prelude-1-txt-source-only: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Source prelude file: $SANDBOX_ROOT/prelude-1.txt 7 | 8 | [Output] 9 | Destination: $PWD/project-amalgamated 10 | Base name: project 11 | Source only. Extension: cpp 12 | Group uninlined headers on top: no 13 | Reduce consecutive blank lines to: no 14 | Trim trailing whitespace: no 15 | Insert annotations: no 16 | 17 | Adding prelude... 18 | Amalgamating files... 19 | ./src/project/header.hpp 20 | ./src/project/source.cpp 21 | 22 | Done. 23 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/source-prelude-2-txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: $SANDBOX_ROOT/prelude-2.txt 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: no 17 | Insert annotations: no 18 | 19 | Adding prelude... 20 | Adding include guard... 21 | Amalgamating files... 22 | ./src/project/header.hpp 23 | ./src/project/source.cpp 24 | 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/expected/trim-trailing-whitespace: -------------------------------------------------------------------------------- 1 | [Input] 2 | Input directory: $PWD 3 | Header search path: $PWD 4 | Input header extensions: h hh hpp hxx h++ tpp txx tpl ii ixx ipp inl 5 | Input source extensions: c cc cpp cxx c++ 6 | Header prelude file: no 7 | Header interlude file: no 8 | 9 | [Output] 10 | Destination: $PWD/project-amalgamated 11 | Base name: project 12 | Header only. Extension: hpp 13 | Include guard: #pragma once 14 | Group uninlined headers on top: no 15 | Reduce consecutive blank lines to: no 16 | Trim trailing whitespace: yes 17 | Insert annotations: no 18 | 19 | Adding include guard... 20 | Amalgamating files... 21 | ./src/project/header.hpp 22 | ./src/project/source.cpp 23 | 24 | Trimming trailing whitespace... 25 | Done. 26 | -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/interlude-1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/verbose-mode-option/requisites/interlude-1.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/interlude-2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/verbose-mode-option/requisites/interlude-2.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/prelude-1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/verbose-mode-option/requisites/prelude-1.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/prelude-2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/verbose-mode-option/requisites/prelude-2.txt -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/project/src/project/header.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/verbose-mode-option/requisites/project/src/project/header.hpp -------------------------------------------------------------------------------- /tests/tests/sandboxes/verbose-mode-option/requisites/project/src/project/source.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shrpnsld/amalgamate/53fb2dd015c49f7f202afd44e45c4b93de46eb3f/tests/tests/sandboxes/verbose-mode-option/requisites/project/src/project/source.cpp -------------------------------------------------------------------------------- /tests/tests/source-prelude-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -p "prelude-one.txt"' 4 | USE-REQUISITES 'project' 'prelude-one.txt' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -p '../prelude-one.txt' 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated-into-header.hpp' 10 | 11 | TEST-CASE 'amalgamate -p "prelude-one.txt" -S' 12 | USE-REQUISITES 'project' 'prelude-one.txt' 13 | cd 'project' 14 | CHECK-COMMAND amalgamate -p '../prelude-one.txt' -S 15 | CHECK-CONTENTS \ 16 | OF-FILE 'project-amalgamated/project.cpp' \ 17 | WITH-FILE 'expected/project-amalgamated-into-source.hpp' 18 | 19 | TEST-CASE 'amalgamate -p "prelude-one.txt" -M' 20 | USE-REQUISITES 'project' 'prelude-one.txt' 21 | cd 'project' 22 | CHECK-COMMAND amalgamate -p '../prelude-one.txt' -M 23 | CHECK-CONTENTS \ 24 | OF-FILE 'project-amalgamated/project.hpp' \ 25 | WITH-FILE 'expected/project-amalgamated-into-pair.hpp' 26 | CHECK-CONTENTS \ 27 | OF-FILE 'project-amalgamated/project.cpp' \ 28 | WITH-FILE 'expected/project-amalgamated-into-pair.cpp' 29 | 30 | TEST-CASE 'amalgamate -p "prelude-two.txt"' 31 | USE-REQUISITES 'project' 'prelude-two.txt' 32 | cd 'project' 33 | CHECK-COMMAND amalgamate -p '../prelude-two.txt' 34 | CHECK-CONTENTS \ 35 | OF-FILE 'project-amalgamated/project.hpp' \ 36 | WITH-FILE 'expected/project-amalgamated-into-header-with-prelude-two.hpp' 37 | 38 | -------------------------------------------------------------------------------- /tests/tests/split-string.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'split-string() with empty string' 4 | result=($(split-string '' ',')) 5 | CHECK [ "${#result[@]}" == 0 ] 6 | 7 | TEST-CASE 'split-string() with single item' 8 | result=($(split-string 'one' ',')) 9 | CHECK [ "${#result[@]}" == 1 ] 10 | CHECK [ "${result[0]}" == 'one' ] 11 | 12 | result=($(split-string 'one,' ',')) 13 | CHECK [ "${#result[@]}" == 1 ] 14 | CHECK [ "${result[0]}" == 'one' ] 15 | 16 | result=($(split-string ',one' ',')) 17 | CHECK [ "${#result[@]}" == 1 ] 18 | CHECK [ "${result[0]}" == 'one' ] 19 | 20 | TEST-CASE 'split-string() with something to split' 21 | result=($(split-string 'one,two,three' ',')) 22 | CHECK [ "${#result[@]}" == 3 ] 23 | CHECK [ "${result[0]}" == 'one' ] 24 | CHECK [ "${result[1]}" == 'two' ] 25 | CHECK [ "${result[2]}" == 'three' ] 26 | 27 | -------------------------------------------------------------------------------- /tests/tests/trim-trailing-whitespace-option.tests: -------------------------------------------------------------------------------- 1 | USE-SANDBOX 2 | 3 | TEST-CASE 'amalgamate -t' 4 | USE-REQUISITES 'project' 5 | cd 'project' 6 | CHECK-COMMAND amalgamate -t 7 | CHECK-CONTENTS \ 8 | OF-FILE 'project-amalgamated/project.hpp' \ 9 | WITH-FILE 'expected/project-amalgamated.hpp' 10 | -------------------------------------------------------------------------------- /tests/tests/trim-trailing-whitespace.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | USE-SANDBOX 4 | 5 | TEST-CASE 'trim-trailing-whitespace() with empty file' 6 | USE-REQUISITES 'empty.hpp' 7 | trim-trailing-whitespace 'empty.hpp' 8 | CHECK-CONTENTS \ 9 | OF-FILE 'empty.hpp' \ 10 | WITH-FILE 'expected/empty.hpp' 11 | 12 | TEST-CASE 'trim-trailing-whitespace() with trimmed file' 13 | USE-REQUISITES 'trimmed.hpp' 14 | trim-trailing-whitespace 'trimmed.hpp' 15 | CHECK-CONTENTS \ 16 | OF-FILE 'trimmed.hpp' \ 17 | WITH-FILE 'expected/trimmed.hpp' 18 | 19 | TEST-CASE 'trim-trailing-whitespace() with non-trimmed file' 20 | USE-REQUISITES 'non-trimmed.hpp' 21 | trim-trailing-whitespace 'non-trimmed.hpp' 22 | CHECK-CONTENTS \ 23 | OF-FILE 'non-trimmed.hpp' \ 24 | WITH-FILE 'expected/non-trimmed.hpp' 25 | 26 | -------------------------------------------------------------------------------- /tests/tests/value-or.tests: -------------------------------------------------------------------------------- 1 | source $(SAMPLE amalgamate) 2 | 3 | TEST-CASE 'value-or() with empty value' 4 | result=$(value-or '' 'alternate') 5 | CHECK [ "$result" == 'alternate' ] 6 | 7 | TEST-CASE 'value-or() with non-empty value' 8 | result=$(value-or 'some' 'alternate') 9 | CHECK [ "$result" == 'some' ] 10 | 11 | --------------------------------------------------------------------------------