Skip to content

Commit e4bcc6f

Browse files
Added test for string2vector from uri parse
1 parent 818df32 commit e4bcc6f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_string2vector.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,16 @@ namespace siddiqsoft::string2vector
4343
auto kv = siddiqsoft::string2vector::parse<std::string>(sampleStr, ": "s);
4444
EXPECT_EQ(6, kv.size());
4545
}
46+
47+
48+
// "http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('Chart%201')?Ranges('Sheet1!A1')=5.5"
49+
TEST(string2vector, parse3)
50+
{
51+
using namespace std;
52+
53+
std::string sampleStr = "/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('Chart%201')";
54+
55+
auto kv = siddiqsoft::string2vector::parse<std::string>(sampleStr, "/"s);
56+
EXPECT_EQ(7, kv.size());
57+
}
4658
} // namespace siddiqsoft::string2vector

0 commit comments

Comments
 (0)