[pathmunge] fix test and modify metadata syntax in the function pathmunge to be easier supported in the test
parent
dabf0e8c42
commit
1cb9093c9c
|
|
@ -365,10 +365,10 @@ all_groups ()
|
||||||
if ! type pathmunge > /dev/null 2>&1
|
if ! type pathmunge > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
function pathmunge () {
|
function pathmunge () {
|
||||||
_about 'prevent duplicate directories in you PATH variable'
|
about 'prevent duplicate directories in you PATH variable'
|
||||||
_group 'lib helpers'
|
group 'lib helpers'
|
||||||
_example 'pathmunge /path/to/dir is equivalent to PATH=/path/to/dir:$PATH'
|
example 'pathmunge /path/to/dir is equivalent to PATH=/path/to/dir:$PATH'
|
||||||
_example 'pathmunge /path/to/dir after is equivalent to PATH=$PATH:/path/to/dir'
|
example 'pathmunge /path/to/dir after is equivalent to PATH=$PATH:/path/to/dir'
|
||||||
|
|
||||||
if ! [[ $PATH =~ (^|:)$1($|:) ]] ; then
|
if ! [[ $PATH =~ (^|:)$1($|:) ]] ; then
|
||||||
if [ "$2" = "after" ] ; then
|
if [ "$2" = "after" ] ; then
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
|
load ../../lib/helpers
|
||||||
load ../../lib/composure
|
load ../../lib/composure
|
||||||
load ../../plugins/available/ruby.plugin
|
load ../../plugins/available/ruby.plugin
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue