Skip to content

Commit

Permalink
test(key_event): unescaped punctuation in serialized KeySequence
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Dec 26, 2016
1 parent ceead59 commit 9ec7740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/key_event_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ TEST(RimeKeySequenceTest, Stringification) {
ASSERT_TRUE(ks.Parse("z y,x."));
ks.push_back(KeyEvent("{"));
ks.push_back(KeyEvent("}"));
EXPECT_STREQ("z{space}y{comma}x{period}{braceleft}{braceright}",
EXPECT_STREQ("z y,x.{braceleft}{braceright}",
ks.repr().c_str());
}

TEST(RimeKeySequenceTest, Serialization) {
KeySequence ks("abc, defg.");
std::ostringstream out;
out << ks;
EXPECT_STREQ("abc{comma}{space}defg{period}", out.str().c_str());
EXPECT_STREQ("abc, defg.", out.str().c_str());
}

0 comments on commit 9ec7740

Please sign in to comment.