diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 6721070c..cae60fd1 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -72,6 +72,14 @@ function local_setup { assert_equal "${new_paths}:${old_path}" "${PATH}" } +@test 'helpers: pathmunge: multiple paths, with duplicate' { + new_paths='/tmp/fake-pathmunge-path1:/tmp/fake pathmunge path2:/tmp/fake-pathmunge-path1:/tmp/fake-pathmunge-path3' + want_paths='/tmp/fake pathmunge path2:/tmp/fake-pathmunge-path1:/tmp/fake-pathmunge-path3' + old_path="${PATH}" + pathmunge "${new_paths}" + assert_equal "${want_paths}:${old_path}" "${PATH}" +} + @test "helpers: bash-it help aliases ag" { run bash-it help aliases "ag" assert_line -n 0 "ag='ag --smart-case --pager=\"less -MIRFX'"