summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwhitley-delamora <62795654+whitley-delamora@users.noreply.github.com>2020-03-28 13:46:47 +0100
committerGitHub <noreply@github.com>2020-03-28 13:46:47 +0100
commit51c0b09f92f140eda10b62d234710f65ad56dee2 (patch)
tree0a6b94edfc74dcc1eaba9a7289206ac8f681ed0b
parentad7c6c76ecb285c146a6b45511a58982a169db26 (diff)
downloadpexpect-git-51c0b09f92f140eda10b62d234710f65ad56dee2.tar.gz
REPLWrapTestCase.test_bash_env(): export variable PS1
The test test_bash_env() relies on PS1 being an environment variable. Therefore, `export PS1` making it always an environment variable. Before this, the test relied on the users bashrc to do this. The variable PS1 is (by default) not an _environment_ variable and thus not shown by `env`. Any variable can be made into an environment variable by exporting it. Some people do this for PS1 in their bashrc. Closes: #631
-rw-r--r--tests/test_replwrap.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_replwrap.py b/tests/test_replwrap.py
index 1e5ff87..5e50ea2 100644
--- a/tests/test_replwrap.py
+++ b/tests/test_replwrap.py
@@ -45,6 +45,7 @@ class REPLWrapTestCase(unittest.TestCase):
"""env, which displays PS1=..., should not mess up finding the prompt.
"""
bash = replwrap.bash()
+ res = bash.run_command("export PS1")
res = bash.run_command("env")
self.assertIn('PS1', res)
res = bash.run_command("echo $HOME")