diff options
author | Omri Sarig <omri.sarig13@gmail.com> | 2020-09-28 23:20:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 22:20:49 +0200 |
commit | f520c1ef859b245c9932106b5487d55c984d410d (patch) | |
tree | c6d10f73e3e27afda0f0efc9b1d5a9c2a7e58efc /test/functional/core/job_spec.lua | |
parent | c5ceefca793b8a78cc22a553b243d66042776d5f (diff) | |
download | rneovim-f520c1ef859b245c9932106b5487d55c984d410d.tar.gz rneovim-f520c1ef859b245c9932106b5487d55c984d410d.tar.bz2 rneovim-f520c1ef859b245c9932106b5487d55c984d410d.zip |
test: Fix failing test in case of special .bashrc (#12920)
The test of "replace environment" in the test module of
`test/functional/core/job_spec.lua` failed in case the bashrc file of
the user running the test has special actions in it (such actions were
printing to the screen from inside this file, or changing the bash mode
to be vi).
In order to fix this problem, the test now sets the shell to be
`/bin/sh` before running the command. Setting the shell to be `/bin/sh`
causes the running shell to run without the configuration of the user,
and so the test passes even in case of special .bashrc.
This change was done only for platforms other than Windows since it is
not relevant in windows.
The fix was applied to the specific test, even though it is possible
that related issues will arise in other tests. It seems like a big
overhead to make the fix work on all the possible tests, and it does not
worth this cost.
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r-- | test/functional/core/job_spec.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 57e6f4fd63..1155f12ffc 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -93,6 +93,7 @@ describe('jobs', function() {'notification', 'stdout', {0, {'hello world %VAR%', ''}}} }) else + nvim('command', "set shell=/bin/sh") nvim('command', [[call jobstart('echo $TOTO $VAR', g:job_opts)]]) expect_msg_seq({ {'notification', 'stdout', {0, {'hello world', ''}}} |