class EclipseCCR(MergeRule): pronunciation = "eclipse jump" mwith = [Navigation().get_pronunciation()] mapping = { #Line Ops "configure": R(Paste(ec_con.analysis_chars)+Key("left:2/5, c-f/20, backslash, rbracket, enter") + \ Function(ec_con.analyze_for_configure), rdescript="Eclipse: Configure"), "jump in [<n>]": R(Key("c-f, a-o")+Paste(r"[\(\[\{\<]")+Function(ec_con.regex_on)+ \ Key("enter:%(n)d/5, escape, right") , rdescript="Eclipse: Jump In"), "jump out [<n>]": R(Key("c-f, a-o")+Paste(r"[\)\] \}\>]")+Function(ec_con.regex_on)+ \ Key("enter:%(n)d/5, escape, right") , rdescript="Eclipse: Jump Out"), "jump back [<n>]": R(Key("c-f/5, a-b")+Paste(r"[\)\]\}\>]")+Function(ec_con.regex_on)+ \ Key("enter:%(n)d/5, escape, left") , rdescript="Eclipse: Jump Back"), "[go to] line <n>": R(Key("c-l") + Pause("50") + Text("%(n)d") + Key("enter")+ Pause("50"), rdescript="Eclipse: Go To Line"), "shackle <n> [<back>]": R(Key("c-l")+Key("right, cs-left")+ \ Function(ec_con.lines_relative), rdescript="Eclipse: Select Relative Lines"), } extras = [ Dictation("text"), IntegerRefST("n", 1, 1000), Boolean("back"), ] defaults = {"n": 1, "back": False}
def test_non_ascii_paste(self): """ Test handling of non-ASCII characters in Paste action. """ action = Paste("touché") self.assertEqual(str(action), "Paste(%r)" % ("touché", ))