From b2279b72375e1948279fb7c6c52637723eb89d43 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Tue, 19 Oct 2021 11:09:28 -0400 Subject: [PATCH] tests: quote paths --- test/plugins/xterm.plugin.bats | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/plugins/xterm.plugin.bats b/test/plugins/xterm.plugin.bats index 123a91f0..9c86e5c7 100644 --- a/test/plugins/xterm.plugin.bats +++ b/test/plugins/xterm.plugin.bats @@ -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" {