tests: quote paths

pull/2002/head
John D Pell 2021-10-19 11:09:28 -04:00
parent b846c86dbb
commit b2279b7237
1 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bats
load ../test_helper
load ../../lib/log
load ../../lib/helpers
load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh"
@ -21,30 +22,30 @@ function local_setup {
@test "plugins xterm: shorten command output" {
export SHORT_TERM_LINE=true
run _short-command ${BASH_IT}/test/fixtures/plugin/xterm/files/*
run _short-command "${BASH_IT}/test/fixtures/plugin/xterm/files"/*
assert_success
assert_output ${BASH_IT}/test/fixtures/plugin/xterm/files/arg0
assert_output "${BASH_IT}/test/fixtures/plugin/xterm/files/arg0"
}
@test "plugins xterm: full command output" {
export SHORT_TERM_LINE=false
run _short-command ${BASH_IT}/test/fixtures/plugin/xterm/files/*
run _short-command "${BASH_IT}/test/fixtures/plugin/xterm/files"/*
assert_success
assert_output "$(echo ${BASH_IT}/test/fixtures/plugin/xterm/files/*)"
assert_output "$(echo "${BASH_IT}/test/fixtures/plugin/xterm/files"/*)"
}
@test "plugins xterm: shorten dirname output" {
export SHORT_TERM_LINE=true
run _short-dirname
assert_success
assert_output "$(basename $PWD)"
assert_output "$(basename "${PWD}")"
}
@test "plugins xterm: full dirname output" {
export SHORT_TERM_LINE=false
run _short-dirname
assert_success
assert_output $PWD
assert_output "${PWD}"
}
@test "plugins xterm: set xterm title" {