Commit graph

17 commits

Author SHA1 Message Date
Yamashita, Yuu
1ec57a0c68 Add basic test for rehash wait 2018-04-24 00:42:47 +00:00
Yamashita, Yuu
7973e59473 Fix rehash test to give up sooner after lock file's presence 2018-04-24 00:38:01 +00:00
Yamashita, Yuu
41ce3aade2 Merge remote-tracking branch 'rbenv/master' into rbenv-1.0 2016-03-02 01:39:52 +00:00
Jason Karns
0f7a2cad8d Use create_hook helper
Use extracted create_hook helper in tests for:

- exec
- hooks
- rehash
- version-name
- version-origin
- which
2016-01-04 09:14:25 -05:00
Mislav Marohnić
1381c2ca79 Simplify the shims registration implementation in rbenv-rehash
It doesn't need to be a bash array and we don't need a separate index of
shims registered. Simply keep everything in a space-separated string and
use that as an index as well.

This assumes that executable names *never* have spaces in them.
2014-10-15 05:46:18 +02:00
Yamashita Yuu
319721b380 Modify applications and versions for Python 2014-01-03 04:41:23 +09:00
Yamashita Yuu
3dd9332eee Fix broken tests 2014-01-03 04:33:30 +09:00
Yamashita Yuu
0965577b93 Import tests from rbenv with sed -e s/rbenv/pyenv/g 2014-01-03 02:06:36 +09:00
Mislav Marohnić
f1fdb9bbc8 Avoid invoking hash -r in fish
It doesn't exist as a builtin, and it doesn't seem there is a way to
detect support for a shell builtin that is portable. So, just detect
fish and don't the rehash command at all.

Fixes #478
2013-10-31 20:18:14 +02:00
Mislav Marohnić
878bd87328 reliably detect parent shell in rbenv init
`$SHELL` variable is a terrible way of detecting the current shell
because it's not even supposed to reflect the current shell; it's meant
for keeping the value of the default shell for programs to start.

If an explicit `<shell>` argument wasn't passed to `rbenv init`, it
tries to detect the shell by getting the name of its parent process. If
this fails, it falls back on the value of `$SHELL` as before.

Furthermore, `rbenv init` will set the RBENV_SHELL variable in the
current shell to the value of the detected shell so that `sh-shell` and
`sh-rehash` commands don't have to repeat the detection.
2013-10-07 03:24:45 +02:00
Mislav Marohnić
31fab8cdae cleanup in fish
Use process subtitution syntax:

    . (rbenv init -|psub)

instead of:

    eval (rbenv init -)

because the latter doesn't work well with newlines.
2013-09-28 16:12:43 +02:00
Jeffrey 'jf' Lim
caa4a8e228 fix rehash when paths have spaces in them
fixes #450
2013-09-26 01:42:34 +02:00
Mislav Marohnić
060f141b21 test that IFS in hooks is correct
closes #379
2013-04-16 14:01:43 +02:00
Mislav Marohnić
7fc5f46bbb undo assert_output_lines in tests
It was a dumb idea and it wasn't even implemented perfectly.
2013-04-08 23:16:35 +02:00
Mislav Marohnić
969af1567a add tests for rehash, whence, which 2013-04-08 23:02:30 +02:00
Mislav Marohnić
bb6bccb782 tests galore 2013-03-07 15:07:32 -05:00
Mislav Marohnić
1fe59e41ea error message when rehash fails on non-writable directory
Fixes #238
2013-03-07 00:13:50 -05:00