mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-13 04:09:25 +00:00
fix(developer): add two text after trailing spaces test cases
This commit is contained in:
parent
1d1ff900a2
commit
5bdd877c5f
1 changed files with 16 additions and 0 deletions
|
|
@ -472,6 +472,22 @@ TEST_F(CompilerTest, GetDelimitedString_test) {
|
|||
EXPECT_EQ(0, u16cmp(u"b ", q));
|
||||
EXPECT_EQ(' ', *p);
|
||||
EXPECT_EQ(6, p-str); // last space after the close delimiter
|
||||
|
||||
// single-character argument, two spaces and text after close delimiter, cut open and close delimiter, valid
|
||||
u16cpy(str, u"(b) def");
|
||||
p = str;
|
||||
q = GetDelimitedString(&p, u"()", GDS_CUTLEAD | GDS_CUTFOLL);
|
||||
EXPECT_EQ(0, u16cmp(u"b", q));
|
||||
EXPECT_EQ('d', *p);
|
||||
EXPECT_EQ(5, p-str); // first text character after the close delimiter
|
||||
|
||||
// single-character argument, two spaces and text after close delimiter, no flags, valid
|
||||
u16cpy(str, u"(b) def");
|
||||
p = str;
|
||||
q = GetDelimitedString(&p, u"()", 0x00);
|
||||
EXPECT_EQ(0, u16cmp(u"b", q));
|
||||
EXPECT_EQ('d', *p);
|
||||
EXPECT_EQ(5, p-str); // first text character after the close delimiter
|
||||
}
|
||||
|
||||
// LinePrefixType GetLinePrefixType(PKMX_WCHAR *p)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue