diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -659,6 +659,9 @@ def tsttest(test, wd, options, replaceme prepos = pos pos = n addsalt(n, False) + cmd = l[4:].split() + if len(cmd) == 2 and cmd[0] == 'cd': + l = ' $ cd %s || exit 1\n' % cmd[1] script.append(l[4:]) elif l.startswith(' > '): # continuations after.setdefault(prepos, []).append(l)