summaryrefslogtreecommitdiff
path: root/test/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils.cpp')
-rw-r--r--test/utils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/utils.cpp b/test/utils.cpp
index b5e9c037..7469dfc0 100644
--- a/test/utils.cpp
+++ b/test/utils.cpp
@@ -275,6 +275,14 @@ TEST_CASE(
}
}
+TEST_CASE("strip_comments ignores escaped # characters (\\#)")
+{
+ const auto expected =
+ std::string(R"#(one two \# three four)#");
+ const auto input = expected + "# and a comment";
+ REQUIRE(utils::strip_comments(input) == expected);
+}
+
TEST_CASE("strip_comments ignores # characters inside double quotes",
"[utils][issue652]")
{