summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Kluyver <thomas@kluyver.me.uk>2016-07-09 22:41:41 +0100
committerThomas Kluyver <thomas@kluyver.me.uk>2016-07-09 22:41:41 +0100
commite2ac2dcf3768aa04f8a1eb4b656b3f0b5a49d945 (patch)
tree884e49dd23ca397fbd6c5f3f557805f2140d373f /tests
parentba20384b6168d3a99a66719894cf04306ac01302 (diff)
downloadpexpect-git-e2ac2dcf3768aa04f8a1eb4b656b3f0b5a49d945.tar.gz
Fix running 'env' in replwrap-ed bash
Diffstat (limited to 'tests')
-rw-r--r--tests/test_replwrap.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_replwrap.py b/tests/test_replwrap.py
index 26ff53c..c9fabd0 100644
--- a/tests/test_replwrap.py
+++ b/tests/test_replwrap.py
@@ -33,6 +33,13 @@ class REPLWrapTestCase(unittest.TestCase):
res = bash.run_command('man sleep', timeout=5)
assert 'SLEEP' in res, res
+ def test_bash_env(self):
+ bash = replwrap.bash()
+ res = bash.run_command("env")
+ self.assertIn('PS1', res)
+ res = bash.run_command("echo $HOME")
+ assert res.startswith('/'), res
+
def test_long_running_multiline(self):
" ensure the default timeout is used for multi-line commands. "
bash = replwrap.bash()