#define CATCH_CONFIG_RUNNER
#include "Catch/catch.hpp"
#include <boost/algorithm/string/predicate.hpp>
#include <cstdlib>
#include <cstring>
#include <memory>
#include "decoration.hpp"
#include "printing.hpp"
#include "TestUtils.hpp"
int
main(int argc, const char *argv[])
{
// Drop all `GIT_*` environment variables as they might interfere with
// running some tests.
extern char **environ;
for (char **e = environ; *e != NULL; ++e) {
if (boost::starts_with(*e, "GIT_")) {
unsetenv(std::string(*e, std::strchr(*e, '=')).c_str());
}
}
// Fix timezone used by the tests.
setenv("TZ", "UTC", true);
PrintingSettings::set(std::make_shared<TestSettings>());
decor::disableDecorations();
// Remove destination directory if it exists to account for crashes.
TempDirCopy tempDirCopy("tests/test-repo/_git", "tests/test-repo/.git",
true);
return Catch::Session().run(argc, argv);
}
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/uncov
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/uncov
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master