mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2025-12-14 18:25:12 +02:00
Add helper functions for $PATH manipulation (#90)
This commit is contained in:
29
tests/autoenv_utils.t
Normal file
29
tests/autoenv_utils.t
Normal file
@@ -0,0 +1,29 @@
|
||||
Tests for provided utils/helpers.
|
||||
|
||||
$ source $TESTDIR/setup.zsh || return 1
|
||||
|
||||
$ PATH=
|
||||
$ autoenv_prepend_path custom_path
|
||||
$ echo $PATH
|
||||
custom_path
|
||||
|
||||
$ autoenv_prepend_path custom_path
|
||||
$ echo $PATH
|
||||
custom_path
|
||||
|
||||
$ autoenv_prepend_path another_path a_third_one
|
||||
$ echo $PATH
|
||||
a_third_one:another_path:custom_path
|
||||
|
||||
$ autoenv_remove_path another_path a_third_one
|
||||
$ echo $PATH
|
||||
custom_path
|
||||
|
||||
$ autoenv_remove_path does_not_exist
|
||||
[1]
|
||||
$ echo $PATH
|
||||
custom_path
|
||||
|
||||
$ autoenv_remove_path custom_path
|
||||
$ echo PATH:$PATH
|
||||
PATH:
|
||||
Reference in New Issue
Block a user