mirror of
https://github.com/znc/znc.git
synced 2026-05-08 14:24:45 +02:00
Merge branch 'master' into 1.8.x
This commit is contained in:
+6
-1
@@ -126,7 +126,12 @@ install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$BUILD_WITH" == "cmake" ]]; then brew outdated cmake || brew upgrade cmake; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew info --json=v1 --installed | jq .; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PKG_CONFIG_PATH="$(brew --prefix qt5)/lib/pkgconfig:$PKG_CONFIG_PATH"; fi
|
||||
- pip3 install coverage
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ls -la ~/.cache; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ls -la ~/.cache/pip; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ls -la ~/.cache/pip/wheels; fi
|
||||
# bad permissions on ARM machine on travis
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv ~/.cache/pip ~/.cache/pip_bad; fi
|
||||
- pip3 install --user coverage
|
||||
- export ZNC_MODPYTHON_COVERAGE=1
|
||||
- "echo pkg-config path: [$PKG_CONFIG_PATH]"
|
||||
script:
|
||||
|
||||
+4
-4
@@ -294,13 +294,13 @@ CString CString::Escape_n(EEscape eFrom, EEscape eTo) const {
|
||||
}
|
||||
|
||||
if (ch == 0) {
|
||||
if (!strncasecmp((const char*)&pTmp, "<", 2))
|
||||
if (!strncasecmp((const char*)&pTmp, "<", 4))
|
||||
ch = '<';
|
||||
else if (!strncasecmp((const char*)&pTmp, ">", 2))
|
||||
else if (!strncasecmp((const char*)&pTmp, ">", 4))
|
||||
ch = '>';
|
||||
else if (!strncasecmp((const char*)&pTmp, """, 4))
|
||||
else if (!strncasecmp((const char*)&pTmp, """, 6))
|
||||
ch = '"';
|
||||
else if (!strncasecmp((const char*)&pTmp, "&", 3))
|
||||
else if (!strncasecmp((const char*)&pTmp, "&", 5))
|
||||
ch = '&';
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -53,6 +53,8 @@ TEST_F(EscapeTest, Test) {
|
||||
testString("&<>", "%26%3C%3E", "&<>", "&<>", "&<>");
|
||||
testString(" ;", "+%3B", " ;", " ;", "\\s\\:");
|
||||
// clang-format on
|
||||
EXPECT_EQ(CString("a<.b>c").Escape_n(CString::EHTML, CString::EASCII),
|
||||
"a<.b>c");
|
||||
}
|
||||
|
||||
TEST(StringTest, Bool) {
|
||||
@@ -199,8 +201,8 @@ TEST(StringTest, Equals) {
|
||||
|
||||
TEST(StringTest, Find) {
|
||||
EXPECT_EQ(CString("Hello, I'm Bob").Find("Hello"), 0u);
|
||||
EXPECT_EQ(
|
||||
CString("Hello, I'm Bob").Find("Hello", CString::CaseInsensitive), 0u);
|
||||
EXPECT_EQ(CString("Hello, I'm Bob").Find("Hello", CString::CaseInsensitive),
|
||||
0u);
|
||||
EXPECT_EQ(CString("Hello, I'm Bob").Find("Hello", CString::CaseSensitive),
|
||||
0u);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user