run-tests: Test REPL emacs keys, but only if present.

Uses cmdline/repl_emacs_check.py to check for presence of emacs keys in
repl before doing full feature test.
pull/1399/merge
Tom Soulanille 2015-07-29 23:16:51 -07:00 zatwierdzone przez Damien George
rodzic 526dd54252
commit 89852d38ef
5 zmienionych plików z 43 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,3 @@
# Check for emacs keys in REPL
t = +11
t == 2

Wyświetl plik

@ -0,0 +1,6 @@
Micro Python \.\+ version
>>> # Check for emacs keys in REPL
>>> t = \.\+
>>> t == 2
True
>>>

Wyświetl plik

@ -0,0 +1,10 @@
# REPL tests of GNU-ish readline navigation
# history buffer navigation
1
2
3


# input line motion
t = 12
'boofar fbar'

Wyświetl plik

@ -0,0 +1,18 @@
Micro Python \.\+ version
>>> # REPL tests of GNU-ish readline navigation
>>> # history buffer navigation
>>> 1
1
>>> 2
2
>>> 3
3
>>> 321
1
>>> 1323
3
>>> # input line motion
>>> t = 121
>>> \.\+
'foobar'
>>>

Wyświetl plik

@ -163,6 +163,12 @@ def run_tests(pyb, tests, args):
if native == b'CRASH':
skip_native = True
# Check if emacs repl is supported, and skip such tests if it's not
t = run_micropython(pyb, args, 'cmdline/repl_emacs_check.py')
if not 'True' in str(t, 'ascii'):
skip_tests.add('cmdline/repl_emacs_check.py')
skip_tests.add('cmdline/repl_emacs_keys.py')
# Some tests shouldn't be run under Travis CI
if os.getenv('TRAVIS') == 'true':
skip_tests.add('basics/memoryerror.py')