|
KiCad PCB EDA Suite
|
Tests for the KIGIT ignore helpers, which write the project's .gitignore and report what git would do with a rule for a path. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <git/git_status_handler.h>#include <git/kicad_git_common.h>#include <git/kicad_git_memory.h>#include <git/kigit_ignore.h>#include <git2.h>#include <map>#include <qa_utils/git_test_fixture.h>#include <wx/ffile.h>#include <wx/filename.h>#include <wx/textfile.h>Go to the source code of this file.
Classes | |
| struct | GIT_IGNORE_FIXTURE |
| A repository holding one committed file, with the project at its root. More... | |
| struct | GIT_IGNORE_SUBDIR_FIXTURE |
| The project is a folder inside a larger repository, where rules have to be anchored to the project rather than the repository root. More... | |
Functions | |
| BOOST_AUTO_TEST_CASE (RuleNamesOnlyThePathPicked) | |
| BOOST_AUTO_TEST_CASE (IgnoredFileLeavesTheCommitList) | |
| BOOST_AUTO_TEST_CASE (IgnoredFolderLeavesTheCommitList) | |
| BOOST_AUTO_TEST_CASE (TrackedPathReportsThatARuleWouldNotApply) | |
| BOOST_AUTO_TEST_CASE (AddingKeepsTheFileTheUserHad) | |
| BOOST_AUTO_TEST_CASE (AddingAfterAnUnterminatedLastLine) | |
| BOOST_AUTO_TEST_CASE (RemovingTakesOnlyTheRuleNamed) | |
| BOOST_AUTO_TEST_CASE (RulesApplyToTheProjectOnly) | |
Variables | |
| static const char * | TEST_AUTHOR_NAME = "Test Author" |
| static const char * | TEST_AUTHOR_EMAIL = "[email protected]" |
Tests for the KIGIT ignore helpers, which write the project's .gitignore and report what git would do with a rule for a path.
Definition in file test_kigit_ignore.cpp.
| BOOST_AUTO_TEST_CASE | ( | AddingAfterAnUnterminatedLastLine | ) |
Definition at line 224 of file test_kigit_ignore.cpp.
References KIGIT::AddIgnoreRules(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and BOOST_REQUIRE_MESSAGE().
| BOOST_AUTO_TEST_CASE | ( | AddingKeepsTheFileTheUserHad | ) |
Definition at line 208 of file test_kigit_ignore.cpp.
References KIGIT::AddIgnoreRules(), BOOST_CHECK_EQUAL(), and BOOST_REQUIRE_MESSAGE().
| BOOST_AUTO_TEST_CASE | ( | IgnoredFileLeavesTheCommitList | ) |
Definition at line 135 of file test_kigit_ignore.cpp.
References KIGIT::AddIgnoreRules(), BOOST_CHECK(), BOOST_REQUIRE(), BOOST_REQUIRE_MESSAGE(), KIGIT_COMMON::GIT_STATUS_IGNORED, and KIGIT::IgnoreState().
| BOOST_AUTO_TEST_CASE | ( | IgnoredFolderLeavesTheCommitList | ) |
Definition at line 161 of file test_kigit_ignore.cpp.
References KIGIT::AddIgnoreRules(), BOOST_CHECK(), BOOST_REQUIRE(), BOOST_REQUIRE_MESSAGE(), KIGIT_COMMON::GIT_STATUS_IGNORED, and KIGIT::IgnoreState().
| BOOST_AUTO_TEST_CASE | ( | RemovingTakesOnlyTheRuleNamed | ) |
Definition at line 239 of file test_kigit_ignore.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_MESSAGE(), KIGIT::IgnoreState(), and KIGIT::RemoveIgnoreRules().
| BOOST_AUTO_TEST_CASE | ( | RuleNamesOnlyThePathPicked | ) |
Definition at line 122 of file test_kigit_ignore.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), KIGIT::ExtensionIgnoreRule(), and KIGIT::PathIgnoreRule().
| BOOST_AUTO_TEST_CASE | ( | RulesApplyToTheProjectOnly | ) |
Definition at line 275 of file test_kigit_ignore.cpp.
References KIGIT::AddIgnoreRules(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_MESSAGE(), and KIGIT::IgnoreState().
| BOOST_AUTO_TEST_CASE | ( | TrackedPathReportsThatARuleWouldNotApply | ) |
Definition at line 189 of file test_kigit_ignore.cpp.
References BOOST_CHECK(), KI_TEST::CommitAllGitFiles(), and KIGIT::IgnoreState().
|
static |
Definition at line 46 of file test_kigit_ignore.cpp.
Referenced by GIT_IGNORE_FIXTURE::GIT_IGNORE_FIXTURE().
|
static |
Definition at line 45 of file test_kigit_ignore.cpp.
Referenced by GIT_IGNORE_FIXTURE::GIT_IGNORE_FIXTURE().