Example #1
0
 def _change_terminal_geometry(self, rows, cols, options):
     # update the pretty printer with the new columns value
     source = '__byexample_pretty_print.update_width(%i)' % cols
     self._exec_and_wait(source,
                         options,
                         timeout=options['x']['dfl_timeout'])
     PexepctMixin._change_terminal_geometry(self, rows, cols, options)
Example #2
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        PexepctMixin.__init__(
            self,
            PS1_re=r'\[cling\]\$',  # [cling]$
            any_PS_re=r'\[cling\][$!](?: \?)?')  # [cling]!
Example #3
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        # --nh     do not read ~/.gdbinit
        # --nx     do not read any .gdbinit
        # --quiet  do not print version number on startup
        PexepctMixin.__init__(self,
                                PS1_re = r'\(gdb\)[ ]',
                                any_PS_re = r'\(gdb\)[ ]')
Example #4
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        self._PS1 = r'/byexample/py/ps1> '
        self._PS2 = r'/byexample/py/ps2> '

        PexepctMixin.__init__(self,
                              PS1_re=self._PS1,
                              any_PS_re=r'/byexample/py/ps\d> ')
Example #5
0
    def run(self, example, options):
        # the algorithm to filter the echos from the cling's output
        # (see _get_output()) doesn't work if the terminal is resized
        # so we disable this:
        options['geometry'] = self._terminal_default_geometry

        # cling's output requeries to be emulated by an ANSI Terminal
        # so we force this (see _get_output())
        options['term'] = 'ansi'

        return PexepctMixin._run(self, example, options)
Example #6
0
 def interact(self, example, options):
     PexepctMixin.interact(self)
Example #7
0
    def __init__(self, verbosity, encoding, **unused):
        PexepctMixin.__init__(self,
                                PS1_re = r'irb[^:]*:\d+:0(>|\*) ',
                                any_PS_re = r'irb[^:]*:\d+:\d+(>|\*|") ')

        self.encoding = encoding
Example #8
0
 def run(self, example, options):
     return PexepctMixin._run(self, example, options)
Example #9
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        PexepctMixin.__init__(self,
                              PS1_re=r"/byexample/sh/ps1> ",
                              any_PS_re=r"/byexample/sh/ps\d+> ")
Example #10
0
    def __init__(self, verbosity, encoding, **unused):
        PexepctMixin.__init__(self,
                                PS1_re = r'node > ',
                                any_PS_re = r'(?:node > )|(?:\.\.\. )')

        self.encoding = encoding