Add tests for `truncate_with_package_name` strategy of dir segment
Add tests for `truncate_with_package_name` strategy of dir segment

This is a backport from #344

bhilburn/powerlevel9k,dritter/powerlevel9k,shibumi/powerlevel9k,natemccurdy/powerlevel9k,rjorgenson/powerlevel9k,rjorgenson/powerlevel9k,dritter/powerlevel9k,bhilburn/powerlevel9k,natemccurdy/powerlevel9k,shibumi/powerlevel9k