aboutsummaryrefslogtreecommitdiff
path: root/test/configparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/configparser.cpp')
-rw-r--r--test/configparser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/configparser.cpp b/test/configparser.cpp
index a0fd4973..24de5db9 100644
--- a/test/configparser.cpp
+++ b/test/configparser.cpp
@@ -54,7 +54,7 @@ TEST_CASE("evaluate_backticks replaces command in backticks with its output",
ConfigParser cfgparser;
KeyMap keys(KM_NEWSBOAT);
cfgparser.register_handler("bind-key", keys);
- REQUIRE_NOTHROW(cfgparser.parse("data/config-space-backticks"));
+ REQUIRE_NOTHROW(cfgparser.parse_file("data/config-space-backticks"));
REQUIRE(keys.get_operation("s", "feedlist") == OP_SORT);
}
@@ -92,7 +92,7 @@ TEST_CASE("\"unbind-key -a\" removes all key bindings", "[ConfigParser]")
SECTION("In all contexts by default") {
KeyMap keys(KM_NEWSBOAT);
cfgparser.register_handler("unbind-key", keys);
- cfgparser.parse("data/config-unbind-all");
+ cfgparser.parse_file("data/config-unbind-all");
for (int i = OP_QUIT; i < OP_NB_MAX; ++i) {
REQUIRE(keys.get_keys(static_cast<Operation>(i),
@@ -105,7 +105,7 @@ TEST_CASE("\"unbind-key -a\" removes all key bindings", "[ConfigParser]")
SECTION("For a specific context") {
KeyMap keys(KM_NEWSBOAT);
cfgparser.register_handler("unbind-key", keys);
- cfgparser.parse("data/config-unbind-all-context");
+ cfgparser.parse_file("data/config-unbind-all-context");
INFO("it doesn't affect the help dialog");
KeyMap default_keys(KM_NEWSBOAT);
@@ -126,19 +126,19 @@ TEST_CASE("include directive includes other config files", "[ConfigParser]")
// TODO: error messages should be more descriptive than "file couldn't be opened"
ConfigParser cfgparser;
SECTION("Errors on not found file") {
- REQUIRE_THROWS(cfgparser.parse("data/config-missing-include"));
+ REQUIRE_THROWS(cfgparser.parse_file("data/config-missing-include"));
}
SECTION("Terminates on recursive include") {
- REQUIRE_THROWS(cfgparser.parse("data/config-recursive-include"));
+ REQUIRE_THROWS(cfgparser.parse_file("data/config-recursive-include"));
}
SECTION("Successfully includes existing file") {
- REQUIRE_NOTHROW(cfgparser.parse("data/config-absolute-include"));
+ REQUIRE_NOTHROW(cfgparser.parse_file("data/config-absolute-include"));
}
SECTION("Success on relative includes") {
- REQUIRE_NOTHROW(cfgparser.parse("data/config-relative-include"));
+ REQUIRE_NOTHROW(cfgparser.parse_file("data/config-relative-include"));
}
SECTION("Diamond of death includes pass") {
- REQUIRE_NOTHROW(cfgparser.parse("data/diamond-of-death/A"));
+ REQUIRE_NOTHROW(cfgparser.parse_file("data/diamond-of-death/A"));
}
SECTION("File including itself only gets evaluated once") {
TestHelpers::TempFile testfile;
@@ -147,7 +147,7 @@ TEST_CASE("include directive includes other config files", "[ConfigParser]")
// recursive includes don't fail
REQUIRE_NOTHROW(
- cfgparser.parse("data/recursive-include-side-effect"));
+ cfgparser.parse_file("data/recursive-include-side-effect"));
// I think it will never get below here and fail? If it recurses, the above fails
int line_count = 0;